- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 119 for max_length (0.18 sec)
-
docs_src/body_fields/tutorial001.py
from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 561 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[str, None], Query(max_length=50)] = None): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 351 bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an.py
from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 611 bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params-str-validations.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 37.5K bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an_py39.py
from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 582 bytes - Viewed (0) -
docs/de/docs/tutorial/query-params-str-validations.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
`Optional` の部分は、エディターによるより良いサポートを可能にします。 /// そして、さらに多くのパラメータを`Query`に渡すことができます。この場合、文字列に適用される、`max_length`パラメータを指定します。 ```Python q: Union[str, None] = Query(default=None, max_length=50) ``` これにより、データを検証し、データが有効でない場合は明確なエラーを表示し、OpenAPIスキーマの *path operation* にパラメータを記載します。 ## バリデーションをさらに追加する パラメータ`min_length`も追加することができます: ```Python hl_lines="10" {!../../docs_src/query_params_str_validations/tutorial003.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0) -
tests/test_path.py
"msg": "ensure this value has at least 3 characters", "type": "value_error.any_str.min_length", "ctx": {"limit_value": 3}, } ] } ) def test_path_param_maxlength_foo(): response = client.get("/path/param-maxlength/foo") assert response.status_code == 200 assert response.json() == "foo"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 34.4K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InternetDomainName.java
/** * Maximum length of a full domain name, including separators, and leaving room for the root * label. See <a href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11. */ private static final int MAX_LENGTH = 253; /** * Maximum size of a single part of a domain name. See <a * href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11. */ private static final int MAX_DOMAIN_PART_LENGTH = 63;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 05 20:47:23 UTC 2024 - 28K bytes - Viewed (0) -
guava/src/com/google/common/net/InternetDomainName.java
/** * Maximum length of a full domain name, including separators, and leaving room for the root * label. See <a href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11. */ private static final int MAX_LENGTH = 253; /** * Maximum size of a single part of a domain name. See <a * href="http://www.ietf.org/rfc/rfc2181.txt">RFC 2181</a> part 11. */ private static final int MAX_DOMAIN_PART_LENGTH = 63;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 05 20:47:23 UTC 2024 - 28K bytes - Viewed (0)