I have started to use Swagger for API documentation. Please help me configure it. How to expand the schema in Swagger UI by default?
from flasgger import Swagger, swag_from
from flask import Flask
app = Flask(__name__)
swagger = Swagger(app)
@swag_from("example.yml", methods=["GET"])
@app.route("/")
def example():
return "Hello World!"
if __name__ == "__main__":
app.run()
example.yml
responses:
'200':
description: Successful response
schema:
type: object
properties:
data:
type: object
properties:
messages:
type: array
items:
type: object
properties:
level:
type: string
title:
type: string
uid:
type: integer
value:
type: string
By default, this example displayed with collapsed Schema model data:
but I need to expand it by default, like: