Forum Discussion
Is this what you mean? The URL you want to query against is not available in the drop down in Swagger UI?
If so, you need to add the proper URL to the available servers on your document. I'm not sure how to achieve this using a Swagger annotation tool, but it should be possible by editing the Swagger/OpenAPI document directly.
What you need to do is edit your "servers" tag to look like so:
Every value you add as a url to your servers tag will be added as an option to the dropdown list when the document is rendered in SwaggerUI. That way, when you "Try It Out" on one of your operations, the API call will be sent to the address you specified.
That might be a solution but it doesn't provide runtime flexibility. I noticed that in the index.html I can use variables to get the protocol/host/port but I don't see that possibility in the configuration file. Maybe I'm missing something though.
Related Content
- 9 months agoAnabelle
- 11 months agoMarcusBengtsson
Recent Discussions
- 16 hours agotriptesh25