Start here. This is the direct spoken answer to practice first.
Overview
Generated OpenAPI becomes useful when the code and release process deliberately own its stable parts.
FastAPI builds OpenAPI from routes, parameter declarations, Pydantic models, response models, and path-operation metadata. I give public operations stable, unique operation IDs and define the success and important error responses clients need. Request and response models are transport contracts rather than ORM snapshots. I generate the document from the assembled application and validate it in CI so router changes, aliases, nullability, or model configuration do not alter the contract unnoticed.