Forum Discussion
suhasOracle
New Contributor
I want to set "host" attribute in Swagger JSON dynamically and update Swagger JSON file.
kyleshockey
6 years agoSmartBear Alumni (Retired)
Hi suhasOracle!
There's no way to have Swagger UI produce a JSON document based on the host information you're setting with setHost(), but you can have it dynamically change based on the URL of your swagger.json by leaving host out completely:
If thehost
is not included, the host serving the documentation is to be used (including the port)
OpenAPI 2.0 Specification
Related Content
- 7 years ago
Recent Discussions
- 6 days ago
- 7 days ago
- 24 days ago