# Upstream examples {#upstream-examples}


The pinned tree ships 78 runnable example groups
under `docs_src/`. Every one of them is a complete FastAPI program.

| Group | Files |
|---|---|
| `additional_responses` | 5 |
| `additional_status_codes` | 3 |
| `advanced_middleware` | 4 |
| `app_testing` | 14 |
| `async_tests` | 4 |
| `authentication_error_status_code` | 2 |
| `background_tasks` | 4 |
| `behind_a_proxy` | 6 |
| `bigger_applications` | 9 |
| `body` | 5 |
| `body_fields` | 3 |
| `body_multiple_params` | 10 |
| `body_nested_models` | 10 |
| `body_updates` | 3 |
| `conditional_openapi` | 2 |
| `configure_swagger_ui` | 4 |
| `cookie_param_models` | 7 |
| `cookie_params` | 3 |
| `cors` | 2 |
| `custom_docs_ui` | 3 |
| `custom_request_and_route` | 6 |
| `custom_response` | 16 |
| `dataclasses_` | 4 |
| `debugging` | 2 |
| `dependencies` | 32 |
| `dependency_testing` | 3 |
| `encoder` | 2 |
| `events` | 4 |
| `extending_openapi` | 2 |
| `extra_data_types` | 3 |
| `extra_models` | 6 |
| `first_steps` | 3 |
| `frontend` | 7 |
| `generate_clients` | 6 |
| `graphql_` | 2 |
| `handling_errors` | 7 |
| `header_param_models` | 9 |
| `header_params` | 7 |
| `json_base64_bytes` | 2 |
| `metadata` | 6 |
| `middleware` | 2 |
| `openapi_callbacks` | 2 |
| `openapi_webhooks` | 2 |
| `opentelemetry` | 3 |
| `path_operation_advanced_configuration` | 8 |
| `path_operation_configuration` | 8 |
| `path_params` | 7 |
| `path_params_numeric_validations` | 13 |
| `pydantic_v1_in_v2` | 5 |
| `python_types` | 14 |
| `query_param_models` | 9 |
| `query_params` | 7 |
| `query_params_str_validations` | 31 |
| `request_files` | 11 |
| `request_form_models` | 13 |
| `request_forms` | 3 |
| `request_forms_and_files` | 3 |
| `response_change_status_code` | 2 |
| `response_cookies` | 3 |
| `response_directly` | 3 |
| `response_headers` | 3 |
| `response_model` | 13 |
| `response_status_code` | 3 |
| `schema_extra_example` | 9 |
| `security` | 15 |
| `separate_openapi_schemas` | 3 |
| `server_sent_events` | 6 |
| `settings` | 19 |
| `sql_databases` | 5 |
| `static_files` | 2 |
| `stream_data` | 3 |
| `stream_json_lines` | 2 |
| `strict_content_type` | 2 |
| `sub_applications` | 2 |
| `templates` | 8 |
| `using_request_directly` | 2 |
| `websockets_` | 5 |
| `wsgi` | 2 |

Example groups are the upstream's own integration tests in documentation form:
each directory contains a `main.py` plus the tutorial text that explains it.
