Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摑 Fixed typo in documentation - Body Fields page #11536

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs_src/body_fields/tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_fields/tutorial001_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_fields/tutorial001_an_py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_fields/tutorial001_an_py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs_src/body_fields/tutorial001_py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tutorial/test_body_fields/test_tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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",
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tutorial/test_body_fields/test_tutorial001_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand All @@ -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",
}
Expand Down