FastAPI 0.140.7: Less OpenAPI Noise, Better Benchmarking

FastAPI · 27 Jul 2026 · 1 min read

#fastapi

FastAPI 0.140.7 is out, focusing on code quality, internal tooling, and performance measurement. The key change is a refactor that avoids flattening dependencies in OpenAPI generation.

  • Refactor dependency flattening for OpenAPI: PR #16076 by @tiangolo. Previously, FastAPI flattened dependencies (e.g., Depends(get_db)) into the OpenAPI schema, often producing redundant or overly complex parameter definitions. This refactor makes the schema more compact and accurate, reducing noise for API consumers and preventing misinterpretations in generated clients.
  • Upgrade latest-changes workflow: PR #16077 updates the internal latest-changes tooling to version 0.7.1 for better release note generation.
  • Add OpenAPI dependency benchmarks: PR #16075 introduces performance benchmarks for OpenAPI generation with dependencies. These automated benchmarks help track efficiency regressions and ensure the refactoring doesn't degrade performance.

For developers, the dependency flattening fix means cleaner OpenAPI output—expect fewer redundant parameter entries, simpler schemas, and improved compatibility with tools that parse OpenAPI specs. The benchmarks also future-proof FastAPI's performance. Upgrading is recommended for anyone generating OpenAPI specs with complex dependency trees.

Source: https://github.com/fastapi/fastapi/releases/tag/0.140.7

Related

auto-curated · source linked above ← all news