Home Posts Projects

FastAPI to include servers when generating OpenAPI spec

28-10-2024

OpenAPI schema:

  • requires the inclusion of servers to specify the base URL for the API, which is not handled by default in the FastAPI OpenAPI spec generation, this can be opted in for
    • https://github.com/fastapi/fastapi/issues/872
    • https://github.com/fastapi/fastapi/pull/1547

Errors

  • https://community.openai.com/t/random-aiohttp-clientresponseerror/577507

Related

12-06-2025

FastAPI exmaples not showing up in swagger docs of OpenAPI spec

07-12-2025

Async testing in fastapi

30-09-2025

Using logfire to instrument application

© 2026 Luke Miloszewski

Email Address GitHub Twitter