Skip to content

Allow for doc_expansion = 'none' to collapse api #1544

@nrccua-timr

Description

@nrccua-timr

I'm asking for an option to set the api paths and schema to be collapsed by default, essentially docExpansion = 'none'.

Ideally we could set it like this:

app = FastAPI(
title='My Killer Web App',
description='love FastAPI with whole heart!',
version='2.0.0',
docExpansion='none'
)

If there is already a way to do this I'd love to know, as I've already looked through the FastAPI documentation and performed hours of google searches in an attempt to discover how to do this in FastAPI, with no luck.

  • OS: macOS and alpine via docker:
  • FastAPI Version: 0.55.1
  • Python version: 3.8.3

Ideal default view

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions