danieleteti / delphimvcframework

DMVCFramework (for short) is a popular and powerful framework for WEB API in Delphi. Supports RESTful and JSON-RPC WEB APIs development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add docExpansion parameter for Swagger

ads69 opened this issue · comments

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

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
    }
commented

Ola Joao,
Great ! it works fine.