Forum Discussion
suhasOracle
7 years agoNew Contributor
I want to set "host" attribute in Swagger JSON dynamically and update Swagger JSON file.
kyleshockey
Alumni
7 years agoHi 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 thehostis not included, the host serving the documentation is to be used (including the port)
OpenAPI 2.0 Specification