Skip to main content
FastAPI Docs

Search documentation

Type to search this documentation.

On this pageOverview

General - How To - Recipes

Here are several pointers to other places in the docs, for general or frequent questions.

To ensure that you don't return more data than you should, read the docs for Tutorial - Response Model - Return Type.

Optimize Response Performance - Response Model - Return Type

Section titled “Optimize Response Performance - Response Model - Return Type”

To optimize performance when returning JSON data, use a return type or response model, that way Pydantic will handle the serialization to JSON on the Rust side, without going through Python. Read more in the docs for Tutorial - Response Model - Return Type.

To add tags to your path operations, and group them in the docs UI, read the docs for Tutorial - Path Operation Configurations - Tags.

Documentation Summary and Description - OpenAPI

Section titled “Documentation Summary and Description - OpenAPI”

To add a summary and description to your path operations, and show them in the docs UI, read the docs for Tutorial - Path Operation Configurations - Summary and Description.

Documentation Response description - OpenAPI

Section titled “Documentation Response description - OpenAPI”

To define the description of the response, shown in the docs UI, read the docs for Tutorial - Path Operation Configurations - Response description.

Documentation Deprecate a Path Operation - OpenAPI

Section titled “Documentation Deprecate a Path Operation - OpenAPI”

To deprecate a path operation, and show it in the docs UI, read the docs for Tutorial - Path Operation Configurations - Deprecation.

To convert any data to JSON-compatible, read the docs for Tutorial - JSON Compatible Encoder.

To add metadata to your OpenAPI schema, including a license, version, contact, etc, read the docs for Tutorial - Metadata and Docs URLs.

To customize the OpenAPI URL (or remove it), read the docs for Tutorial - Metadata and Docs URLs.

To update the URLs used for the automatically generated docs user interfaces, read the docs for Tutorial - Metadata and Docs URLs.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu