Open dschulten opened 7 years ago
Hi,
Thank you for the feature request. Recently I've build a similar tool for the Mulesoft's API Console. RAML spec defines URI templates and I had to build an editor to provide the values for this templates. So the user is able to change the value in the URL editor and in so called parameters editor where you have a form with input fields to place the values.
However, how this refers to the app variables? You can do the same thing already in arc by defining a variable and use the variable in the URL. Isn't it the same thing?
Thanks
Who will benefit from this feature?
Developers using media types with uri templates, such as HAL, siren, Hydra which allow to browse an API.
Overview
RFC6570 is a standard to describe URI templates where clients can fill in placeholders. There is ample toollng for this kind of template available, also in Javascript. I use https://github.com/geraintluff/uri-templates.
Example templates are: http://example.com/~{username}/ http://example.com/dictionary/{term:1}/{term} http://example.com/search{?q,lang}
Use cases
Working with URI Template
Reusing URI Template
Precondition: User has entered values for a UriTemplate in a previous request
Do you know anyone else, internal or external, that is also interested in this feature?
No
Do you expect this feature to be fairly stable? How might it be extended or changed in the future?
Stable. RFC 6570 is well-established and supporting tools are mature.
List every UI surface belonging to or potentially affected by this feature:
Request
How could this feature be abused?
The system must ensure that stored placeholders will only be applied to the URL for which they were entered originally. Otherwise values not intended for a URL might be entered unintentionally.
Imagine you’re Dr. Evil app user, list the three worst evil deeds you could commit with your feature (if you’ve got good ones, feel free to add more): I have limited evil imagination, but I do not see any.
Open questions
None
Example usage
Sample usage of https://github.com/geraintluff/uri-templates in node