Open Icarus9913 opened 2 years ago
The UseSwaggerUI is a toggle between a redoc docs site and a swagger ui docs site.
if you want to disable /docs you can use a global middleware that returns not found for the /docs path.
Copied by @casualjim : A server project built by go-swagger owns the capability to provide a UI. And the property 'useSwaggerUI' is a toggle between a redoc docs site and a swagger ui docs site, which could be thought as a UI theme.
The UI is very small, it's a single js you include in a basic html5 page. All the capability provided by 'go-openapi' project.
For details, you can find below: https://github.com/go-openapi/runtime/blob/master/middleware/redoc.go https://github.com/go-openapi/runtime/blob/master/middleware/swaggerui.go
Hello! I checked
examples/tutorials/todo-list/server-complete
source codes and did not find api propertyuseSwaggerUI
set to be true or methodfunc (o *TodoListAPI) UseSwaggerUI()
is called. But I still can visit swaggerUI with route /docs. How does it possible? Is there any flags did it which I ignored?Environment
swagger version: 42c184c0 OS: darwin