Commit Graph

7 Commits

Author SHA1 Message Date
voegtlel 3397d4d69a
Implement response_model_exclude_defaults and response_model_exclude_none (#1166)
* 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 <lukas.voegtle@sick.de>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2020-04-05 15:04:46 +02:00
Patrick McKenna 3c1803897f
🐛 Fix path encoding (#978) 2020-02-16 21:06:41 +01:00
Stéphane Wirtel e04bae2286 🐛 Fix the usage of custom_encoder for jsonable_encoder #714 (#715) 2019-11-27 21:23:23 +01:00
dmontagu ab2b86fe2c Add support for Pydantic v1 and above 🎉 (#646)
* 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
2019-11-27 20:32:02 +01:00
Sebastián Ramírez 9e748dbca4
By default, encode by alias (#168) 2019-04-20 20:29:54 +04:00
Sebastián Ramírez 9745a5d1ae
🐛 Fix jsonable_encoder for models with Config (#29)
but without json_encoders
2019-02-12 21:43:34 +04:00
Sebastián Ramírez 510fec9bee ♻️ Refactor jsonable_encoder and test it
with nested arbitrary classes
2018-12-22 17:15:04 +04:00