* ✨ Add Default and DefaultPlaceholder data structures
to handle defaults and overrides
* ✨ Add utils to get values by priority handling DefaultPlaceholders
* ✨ Add support for top-level parameters in FastAPI, APIRouter, include_router
including: prefix, tags, dependencies, deprecated, include_in_schema, responses, default_response_class, callbacks
* ♻️ Update openapi utils to handle DefaultPlaceholder for response_class
* 📝 Update bigger-application example code to use top-level params
and showcase them in APIRouter, FastAPI, include_router
* 📝 Update docs for Bigger Applications, include diagrams, top-level params
* 🔥 Simplify code and docs for callbacks as default_response_class is no longer required
* 📝 Add docs for top-level dependencies, in FastAPI()
* 📝 Add docs reference to top-level dependencies in docs for decorator
* ✅ Update/increase tests for Bigger Applications including shared parameters
* ✅ Add tests for top-level dependencies in FastAPI()
* ✅ Add tests for internal DefaultPlaceholder
* ✅ Update/increase tests for callbacks with top-level parameters
* ✅ Add LOTS of tests covering branches and cases for shared parameters
in top-level FastAPI, path operations, include_router, APIRouter, its path operations, nested include_router, nested APIRouter, and its path operations
* 🎨 Format/reorder parameters for consistency in FastAPI, APIRouter, include_router
* 🔥 Remove support for Pydantic < 1.0
* 🔥 Remove deprecated skip_defaults from jsonable_encoder and set default for exclude to None, as in Pydantic
* ♻️ Set default of response_model_exclude=None as in Pydantic
* ⬆️ Require Pydantic >=1.0.0 in requirements
* root_path included in servers object instead of path prefix
* ♻️ Refactor implementation of auto-including root_path in OpenAPI servers
* 📝 Update docs and examples for Behind a Proxy, including servers
* 📝 Update Extending OpenAPI as openapi_prefix is no longer needed
* ✅ Add extra tests for root_path in servers and root_path_in_servers=False
* 🍱 Update security docs images with relative token URL
* 📝 Update security docs with relative token URL
* 📝 Update example sources with relative token URLs
* ✅ Update tests with relative tokens
Co-authored-by: Sebastián Ramírez <[email protected]>
* feat: add servers option for OpenAPI
Closes#872
* ✨ Use dicts for OpenAPI servers
* ♻️ Update OpenAPI Server model to support relative URLs
* ✅ Add tests for OpenAPI servers
* ♻️ Re-order parameter location of servers for OpenAPI
* 🎨 Format code
Co-authored-by: Sebastián Ramírez <[email protected]>
* Allow to add OpenAPI tag descriptions
* fix type hint
* fix type hint 2
* refactor test to assure 100% coverage
* 📝 Update tags metadata example
* 📝 Update docs for tags metadata
* ✅ Move tags metadata test to tutorial subdir
* 🎨 Update format in applications
* 🍱 Update docs UI image based on new example
* 🎨 Apply formatting after solving conflicts
Co-authored-by: Sebastián Ramírez <[email protected]>
* drop model class from additional responses when generating openapi
* ♻️ Copy response to be mutated early in get_openapi_path
Co-authored-by: Sebastián Ramírez <[email protected]>
* 🐛 Fix extra support for enum with its own schema
* ✅ Fix/update test for enum with its own schema
* 🐛 Fix type declarations
* 🔧 Update format and lint scripts to support locally installed Pydantic and Starlette
* 🐛 Add temporary type ignores while enum schemas are merged
* Implemented response_model_exclude_defaults and response_model_exclude_none to be compatible pydantic options.
* 🚚 Rename and invert include_none to exclude_none to keep in sync with Pydantic
Co-authored-by: Lukas Voegtle <[email protected]>
Co-authored-by: Sebastián Ramírez <[email protected]>
* Make compatible with pydantic v1
* Remove unused import
* Remove unused ignores
* Update pydantic version
* Fix minor formatting issue
* ⏪ Revert removing iterate_in_threadpool
* ✨ Add backwards compatibility with Pydantic 0.32.2
with deprecation warnings
* ✅ Update tests to not break when using Pydantic < 1.0.0
* 📝 Update docs for Pydantic version 1.0.0
* 📌 Update Pydantic range version to support from 0.32.2
* 🎨 Format test imports
* ✨ Add support for Pydantic < 1.2 for populate_validators
* ✨ Add backwards compatibility for Pydantic < 1.2.0 with required fields
* 📌 Relax requirement for Pydantic to < 2.0.0 🎉🚀
* 💚 Update pragma coverage for older Pydantic versions
* 🏗️ Implement unique IDs for dynamic models
like those used for composite bodies and responses. IDs based on path (not only on function name, as it can be duplicated in a different module).
* ✅ Add tests for same function name and composite body
* ✅ Update OpenAPI in tests with new dynamic model ID generation
* ✨ Refactor parameter dependency using Pydantic Field
* ⬆️ Upgrade required Pydantic version with latest Shape values
* ✨ Add tutorials and code for using Enum and Optional
* ✅ Add tests for tutorials with new types and extra cases
* ♻️ Format, clean, and add annotations to dependencies.utils
* 📝 Update tutorial for query parameters with list defaults
* ✅ Add tests for query param with list default