0

In Redoc, you can open the Response samples using the "Expand all" button:

enter image description here

I want to put this as the default value via custom_openapi(). Here is my code:

def custom_openapi():
    if app.openapi_schema:
        return app.openapi_schema
    openapi_schema = get_openapi(
        title=title,
        version="1.0",
        description=description,
        routes=app.routes,

    )
    app.openapi_schema = openapi_schema
    return app.openapi_schema


openapi_schema = custom_openapi()

How can I set it up?

Helen
  • 87,344
  • 17
  • 243
  • 314

1 Answers1

0

Redoc supports a expandResponses as one of its configuration options, I'm not familiar with passing the Redoc configuration within FastAPI but setting the value "all", it should show all responses expanded.

Lorna Mitchell
  • 1,819
  • 13
  • 22