I embedded Swagger UI in my web application. I dynamically set the "host" on Swagger JSON inside swaggerui/index.html -
My question is how to download Swagger JSON updated with "host" ? Is there a way I can print the swaggerUI object which contains swagger Json?
Community, is there anything we can suggest?
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:
hostis not included, the host serving the documentation is to be used (including the port)
OpenAPI 2.0 Specification