How to hide the Models section in Swagger UI?

前端 未结 5 1265
遇见更好的自我
遇见更好的自我 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:58

    If using Django add this inside your settings.py:

    SWAGGER_SETTINGS = {
        'DEFAULT_MODEL_DEPTH':-1
    }
    

提交回复
热议问题