From 0d754535e7ff566decd48a43cfc470e1317f930b Mon Sep 17 00:00:00 2001 From: Keming Date: Tue, 18 Jul 2023 10:27:34 +0800 Subject: [PATCH] chore: add pydantic v1&v2 test (#327) Signed-off-by: Keming --- Makefile | 2 ++ README.md | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3c763099..8276dc0f 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ import_test: test: import_test pip install -U -e .[email,flask,quart,falcon,starlette] pytest tests -vv -rs + pip install --force-reinstall 'pydantic[email]<2' + pytest tests -vv -rs doc: cd docs && make html diff --git a/README.md b/README.md index 1ad866bb..4989c708 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Yet another library to generate OpenAPI documents and validate requests & respon * Less boilerplate code, only annotations, no need for YAML :sparkles: * Generate API document with [Redoc UI](https://github.com/Redocly/redoc) or [Swagger UI](https://github.com/swagger-api/swagger-ui) :yum: -* Validate query, JSON data, response data with [pydantic](https://github.com/samuelcolvin/pydantic/) :wink: +* Validate query, JSON data, response data with [pydantic](https://github.com/samuelcolvin/pydantic/) :wink: (we support both v1 and v2) * Current support: * Flask [demo](#flask) * Quart [demo](#quart) diff --git a/pyproject.toml b/pyproject.toml index fcfb1cc2..7153d125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spectree" -version = "1.1.5" +version = "1.2.0" dynamic = [] description = "generate OpenAPI document and validate request&response with Python annotations." readme = "README.md"