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
This commit is contained in:
dmontagu
2019-11-27 11:32:02 -08:00
committed by Sebastián Ramírez
parent 90a5796b94
commit ab2b86fe2c
66 changed files with 802 additions and 425 deletions

View File

@@ -31,7 +31,7 @@ openapi_schema = {
"parameters": [
{
"required": True,
"schema": {"title": "Item_Id", "type": "string"},
"schema": {"title": "Item Id", "type": "string"},
"name": "item_id",
"in": "path",
}

View File

@@ -31,7 +31,7 @@ openapi_schema = {
"parameters": [
{
"required": True,
"schema": {"title": "Item_Id", "type": "string"},
"schema": {"title": "Item Id", "type": "string"},
"name": "item_id",
"in": "path",
}

View File

@@ -31,7 +31,7 @@ openapi_schema = {
"parameters": [
{
"required": True,
"schema": {"title": "Item_Id", "type": "integer"},
"schema": {"title": "Item Id", "type": "integer"},
"name": "item_id",
"in": "path",
}

View File

@@ -31,7 +31,7 @@ openapi_schema = {
"parameters": [
{
"required": True,
"schema": {"title": "Item_Id", "type": "integer"},
"schema": {"title": "Item Id", "type": "integer"},
"name": "item_id",
"in": "path",
}