Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docExpansion parameter for Swagger #408

Closed
ads69 opened this issue Aug 5, 2020 · 2 comments
Closed

Add docExpansion parameter for Swagger #408

ads69 opened this issue Aug 5, 2020 · 2 comments

Comments

@ads69
Copy link

ads69 commented Aug 5, 2020

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

@joaoduarte19
Copy link
Collaborator

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
Copy link
Author

ads69 commented Aug 6, 2020

Ola Joao,
Great ! it works fine.

@ads69 ads69 closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants