From 88a7f70e8e7a18e3f832c80cda7361afedf71148 Mon Sep 17 00:00:00 2001 From: Dauletkhan Assanov Date: Mon, 6 May 2024 10:35:00 +0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9DFixed=20typo=20in=20documentati?= =?UTF-8?q?on=20-=20Body=20Fields=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs_src/body_fields/tutorial001.py | 2 +- docs_src/body_fields/tutorial001_an.py | 2 +- docs_src/body_fields/tutorial001_an_py310.py | 2 +- docs_src/body_fields/tutorial001_an_py39.py | 2 +- docs_src/body_fields/tutorial001_py310.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs_src/body_fields/tutorial001.py b/docs_src/body_fields/tutorial001.py index cbeebd614ad53..1c7ad5547d912 100644 --- a/docs_src/body_fields/tutorial001.py +++ b/docs_src/body_fields/tutorial001.py @@ -9,7 +9,7 @@ class Item(BaseModel): name: str description: Union[str, None] = Field( - default=None, title="The description of the item", max_length=300 + default=None, title="The title of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None diff --git a/docs_src/body_fields/tutorial001_an.py b/docs_src/body_fields/tutorial001_an.py index 15ea1b53dca0f..05f586c4b3b9c 100644 --- a/docs_src/body_fields/tutorial001_an.py +++ b/docs_src/body_fields/tutorial001_an.py @@ -10,7 +10,7 @@ class Item(BaseModel): name: str description: Union[str, None] = Field( - default=None, title="The description of the item", max_length=300 + default=None, title="The title of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None diff --git a/docs_src/body_fields/tutorial001_an_py310.py b/docs_src/body_fields/tutorial001_an_py310.py index c9d99e1c2b373..0e85de3b3943f 100644 --- a/docs_src/body_fields/tutorial001_an_py310.py +++ b/docs_src/body_fields/tutorial001_an_py310.py @@ -9,7 +9,7 @@ class Item(BaseModel): name: str description: str | None = Field( - default=None, title="The description of the item", max_length=300 + default=None, title="The title of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: float | None = None diff --git a/docs_src/body_fields/tutorial001_an_py39.py b/docs_src/body_fields/tutorial001_an_py39.py index 6ef14470cd57f..560782c3a2cee 100644 --- a/docs_src/body_fields/tutorial001_an_py39.py +++ b/docs_src/body_fields/tutorial001_an_py39.py @@ -9,7 +9,7 @@ class Item(BaseModel): name: str description: Union[str, None] = Field( - default=None, title="The description of the item", max_length=300 + default=None, title="The title of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None diff --git a/docs_src/body_fields/tutorial001_py310.py b/docs_src/body_fields/tutorial001_py310.py index 4437327f3bf82..1c76921723ebc 100644 --- a/docs_src/body_fields/tutorial001_py310.py +++ b/docs_src/body_fields/tutorial001_py310.py @@ -7,7 +7,7 @@ class Item(BaseModel): name: str description: str | None = Field( - default=None, title="The description of the item", max_length=300 + default=None, title="The title of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: float | None = None From e8efce6c42d869b86d69d5593e4fa8534628d30e Mon Sep 17 00:00:00 2001 From: Dauletkhan Assanov Date: Mon, 6 May 2024 10:45:01 +0500 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9DFixed=20tests=20regarding=20the?= =?UTF-8?q?=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_tutorial/test_body_fields/test_tutorial001.py | 4 ++-- tests/test_tutorial/test_body_fields/test_tutorial001_an.py | 4 ++-- .../test_body_fields/test_tutorial001_an_py310.py | 4 ++-- .../test_body_fields/test_tutorial001_an_py39.py | 4 ++-- .../test_tutorial/test_body_fields/test_tutorial001_py310.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001.py b/tests/test_tutorial/test_body_fields/test_tutorial001.py index fd6139eb9b771..3a0c6a6e84eaf 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001.py @@ -132,7 +132,7 @@ def test_openapi_schema(client: TestClient): "name": {"title": "Name", "type": "string"}, "description": IsDict( { - "title": "The description of the item", + "title": "The title of the item", "anyOf": [ {"maxLength": 300, "type": "string"}, {"type": "null"}, @@ -142,7 +142,7 @@ def test_openapi_schema(client: TestClient): | IsDict( # TODO: remove when deprecating Pydantic v1 { - "title": "The description of the item", + "title": "The title of the item", "maxLength": 300, "type": "string", } diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001_an.py b/tests/test_tutorial/test_body_fields/test_tutorial001_an.py index 72c18c1f73a12..30f0a78679f9c 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001_an.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001_an.py @@ -132,7 +132,7 @@ def test_openapi_schema(client: TestClient): "name": {"title": "Name", "type": "string"}, "description": IsDict( { - "title": "The description of the item", + "title": "The title of the item", "anyOf": [ {"maxLength": 300, "type": "string"}, {"type": "null"}, @@ -142,7 +142,7 @@ def test_openapi_schema(client: TestClient): | IsDict( # TODO: remove when deprecating Pydantic v1 { - "title": "The description of the item", + "title": "The title of the item", "maxLength": 300, "type": "string", } diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py b/tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py index 1bc62868fd6c9..d622a4680fcbc 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py @@ -138,7 +138,7 @@ def test_openapi_schema(client: TestClient): "name": {"title": "Name", "type": "string"}, "description": IsDict( { - "title": "The description of the item", + "title": "The title of the item", "anyOf": [ {"maxLength": 300, "type": "string"}, {"type": "null"}, @@ -148,7 +148,7 @@ def test_openapi_schema(client: TestClient): | IsDict( # TODO: remove when deprecating Pydantic v1 { - "title": "The description of the item", + "title": "The title of the item", "maxLength": 300, "type": "string", } diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py b/tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py index 3c5557a1b25ba..17e6bbca7efa7 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py @@ -138,7 +138,7 @@ def test_openapi_schema(client: TestClient): "name": {"title": "Name", "type": "string"}, "description": IsDict( { - "title": "The description of the item", + "title": "The title of the item", "anyOf": [ {"maxLength": 300, "type": "string"}, {"type": "null"}, @@ -148,7 +148,7 @@ def test_openapi_schema(client: TestClient): | IsDict( # TODO: remove when deprecating Pydantic v1 { - "title": "The description of the item", + "title": "The title of the item", "maxLength": 300, "type": "string", } diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001_py310.py b/tests/test_tutorial/test_body_fields/test_tutorial001_py310.py index 8c1386aa673bc..3c6988d2aeefa 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001_py310.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001_py310.py @@ -138,7 +138,7 @@ def test_openapi_schema(client: TestClient): "name": {"title": "Name", "type": "string"}, "description": IsDict( { - "title": "The description of the item", + "title": "The title of the item", "anyOf": [ {"maxLength": 300, "type": "string"}, {"type": "null"}, @@ -148,7 +148,7 @@ def test_openapi_schema(client: TestClient): | IsDict( # TODO: remove when deprecating Pydantic v1 { - "title": "The description of the item", + "title": "The title of the item", "maxLength": 300, "type": "string", }