the documentation of this project "swagger-api/swagger-ui" is really bad, it better find out the things in google. Why is there no examples?
i'm trying to figure out these things...
_swagger solve the torture of to document an api but you suffer the torture of swagger documentation_
best regards.
Hi @irianowork, sorry to hear you're having trouble!
I want to change the "tryout" button default hostname, how can i do that?
The best way to do this is to change your OpenAPI document's API Server and Base URL (swagger.io) to provide the hostnames you need.
If you want to customize behavior within Swagger UI specifically, you can use the requestInterceptor option to modify requests that Swagger UI makes.
It is possible to indicate in the url some config file, to change the aspect of the web?
Yes! You can pass a configUrl to Swagger UI, and provide any Swagger UI configuration options you'd like to in a YAML document at that URL.
You'll notice that everything I've linked you to is either in Swagger UI's documentation or swagger.io's documentation. Our documentation isn't perfect, but it does cover a lot of use cases IMO 馃檪
hi,
i麓m running the swagger-ui in localhost:8083
i麓ve created a swagger-config.yaml with this two lines...
servers:
...then i麓ve pass the file with "xxx?configUrl=http://xxx/swagger-config.yaml" but it doen麓t work, the tryout hostname is again localhost:8080, and no errors in chrome console.
this is a good example for your doc ;)
I, too, am suffering from the docs. The installation tells me how to require the module. The configuration tells me how to specify options. Nowhere can I find how to tie it all together and instantiate the SwaggerUI, with options object telling the spec location, and how to hook that into an express route. Yes, I know bits of each of these. But I can't seem to tie it all together. A full example would be extremely helpful!
Definitely agree with the above. I am still working on figuring this out so if any of you did figure it out, it might be helpful to post it here so more people like me can figure it out easier.
Most helpful comment
I, too, am suffering from the docs. The installation tells me how to require the module. The configuration tells me how to specify options. Nowhere can I find how to tie it all together and instantiate the SwaggerUI, with options object telling the spec location, and how to hook that into an express route. Yes, I know bits of each of these. But I can't seem to tie it all together. A full example would be extremely helpful!