stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.

Home Page:https://stoplight.io/open-source/elements/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add brackets around default URL parameters

amerritt14 opened this issue · comments

Under the "Try It" request samples when there are URL parameters required in the endpoint, the current behavior is to substitute the URL parameter's name into the URL until a value is entered. Once the value is entered, the value is used instead.

When no value is entered, curly brackets should be included around the parameter's name to make it clear that the value should be replaced.

Context

Clarify the "Try It" code samples when no parameters have been entered.
Change from showing the endpoint url as https://api.example.com/users/userId to https://api.example.com/users/{userId}
Screenshot 2023-04-10 at 8 33 25 AM

Current Behavior

Currently if no details have been entered in the URL parameter, it shows the URL parameter's name in the URL.

Expected Behavior

The URL parameter would be wrapped in {} until the user inputs some value.

Possible Solution(s)

If this is a change that others feel is worthwhile, I'm happy to look into implementation details.