Closed shortwavedave closed 10 months ago
This is a default behavior, defined in
"defaultModelsExpandDepth": "-1", // Hides schemas, override with value "1" in Config.SettingsUI to show schemas.
https://github.com/swaggest/swgui/blob/v1.7.2/internal/index.tpl.go#L29
You can disable it with custom settings for swgui
.
// Swagger UI endpoint at /docs.
s.Docs("/docs", func(title, schemaURL, basePath string) http.Handler {
return swguiv5.NewHandlerWithConfig(swgui.Config{
Title: title,
SwaggerJSON: schemaURL,
BasePath: basePath,
SettingsUI: map[string]string{
"defaultModelsExpandDepth": "1",
},
})
})
instead of
// Swagger UI endpoint at /docs.
s.Docs("/docs", swgui.New)
thank you!
Describe the bug Data Schema's not showing on swagger docs site. Usually the schema is near the bottom. The json schema looks correct
To Reproduce
Expected behavior At the bottom of the docs site there should be a section for schema