Add docExpansion parameter for Swagger
ads69 opened this issue · comments
ads69 commented
Hi,
My swagger is becoming bigger and Bigger and it's becoming quite hard to navigate to all Models.
Any plan to add the docExpansion property for Swagger ?
Like here
Best regards
Armindo
João Antônio Duarte commented
This is a setting that must be entered into the Swagger UI distribution files.
You must open the index.html of the swagger UI files and add docExpansion: 'none'
:
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "/api/swagger.json",
dom_id: '#swagger-ui',
docExpansion: 'none',
validatorUrl : null,
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
})
// End Swagger UI call region
window.ui = ui
}
ads69 commented
Ola Joao,
Great ! it works fine.