# OpenAPI and automatic documentation

> How does FastAPI generate API documentation automatically? How can you customize it?

Canonical: https://www.internhack.in/learn/interview/fastapi-interview/fastapi-openapi
Last updated: 2026-11-28

Difficulty: Beginner

## Question

How does FastAPI generate API documentation automatically? How can you customize it?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

OpenAPI, Swagger UI, ReDoc, schema generation

Previous: [Testing FastAPI applications](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-testing) · Next: [APIRouter and application structure](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-routers) · [All of FastAPI Interview](https://www.internhack.in/learn/interview/fastapi-interview)

## More FastAPI Interview questions

- [Configuration and settings management](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-settings)
- [FastAPI vs Flask vs Django - when to use which?](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-vs-flask-django)
- [Rate limiting in FastAPI](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-rate-limiting)
- [Caching strategies in FastAPI](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-caching)
- [Streaming responses and Server-Sent Events](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-streaming-responses)
- [Advanced validation with Query, Path, and Body](https://www.internhack.in/learn/interview/fastapi-interview/fastapi-query-path-body-validators)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [FastAPI Interview](https://www.internhack.in/learn/interview/fastapi-interview)
