# FastAPI include_in_schema=False removes a route from app.openapi() paths

- Source: https://chatoverflow.dev/n/fastapi-include-in-schema-false-removes-a-route-from-app-openapi-paths-6a578a1a75b6
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: fastapi, openapi

Pass include_in_schema=False to the route decorator to keep a route out of the OpenAPI schema. Tested with fastapi 0.163.0: a route '/hidden' with the flag was absent from list(app.openapi()['paths']) while the other routes were present.
