How to hide the Models section in Swagger UI?

前端 未结 5 1266
遇见更好的自我
遇见更好的自我 2020-12-20 17:03

I use Swagger UI to display API documentation. By default, it displays the \"Models\" section at the bottom:

How to hide it?

5条回答
  •  清酒与你
    2020-12-20 17:36

    To hide the "Models" section, add defaultModelsExpandDepth: -1 to the Swagger UI configuration code in your index.html.

    Note the option name uses plural Model*s* not Model.

    // index.html
    
    
    
                                     
                  
提交回复
热议问题