13. OpenAPI Documentation

Chapter 13 of 18 · 15 min

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

Configure FastAPI to include examples in the OpenAPI specification using Pydantic's model_config. Verify examples appear in the Swagger UI by navigating to /docs and examining endpoint schemas.