Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to edit api base url #935

Closed
Muneer-Shafi opened this issue Aug 27, 2024 · 4 comments
Closed

Way to edit api base url #935

Muneer-Shafi opened this issue Aug 27, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Muneer-Shafi
Copy link

image
i want to edit the url before sending request to the server
here in my case tenant is dynamic and client side user can change it before requesting to the server
current working show dropdown list of servers but not editable

@Muneer-Shafi Muneer-Shafi added the enhancement New feature or request label Aug 27, 2024
@aszenz
Copy link

aszenz commented Aug 27, 2024

Related #609

@sserrata
Copy link
Member

Hi @aszenz, this has been possible for years. Although it's not explicitly documented, the demo APIs provide an example of using variables in the servers definition. The trick is to not provide an enum key, which is normally used when you want to provide predefined variables for users to select from. By leaving enum out the user will be presented with a text input. The default value will be the text input placeholder.

Screenshot 2024-08-27 at 11 17 31 AM

Example snippet:

servers:
  - url: https://{tenant}.example.dev
    description: Testing variable with user input
    variables:
      tenant:
        default: tenant

@sserrata
Copy link
Member

Sorry, meant to tag @Muneer-Shafi, hope this helps!

@Muneer-Shafi
Copy link
Author

@sserrata Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants