Add pydantic v2 as output model type (#1391)

* Add pydantic_v2 model module

* Change custom_root_type to root_model

* add unittest

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix unittest file

* Fix unittest file

* Support ConfigDict

* Fix type

* Add unittest

* Add unittest

* Add unittest

* Fix unittest

* Fix unittest

* change min/max items to min/max length

* change min/max items to min/max length

* use pattern instead of regex

* remove const

* remove uniqueItems

* WIP

* WIP

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix imports

* Remove unused code

* Fix lint

* Update documents

* Refactor model

* Refactor model

* Fix types

* Fix coverage

* Update documents

* Fix coverage

* Add unittest

* Add unittest

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Koudai Aono
2023-07-03 10:54:46 +09:00
committed by GitHub
parent a284c99739
commit dfb601bbcb
32 changed files with 1529 additions and 100 deletions

View File

@@ -20,6 +20,7 @@ nav:
- Overview: index.md
- Support data types: supported-data-types.md
- Usage:
- What is the difference between pydantic v1 and v2 output model: what_is_the_difference_between_v1_and_v2.md
- Generate from OpenAPI: openapi.md
- Generate from JSON Schema: jsonschema.md
- Generate from JSON Data: jsondata.md