- Sort Score
- Result 10 results
- Languages All
Results 591 - 600 of 1,835 for none (0.04 sec)
-
docs/de/docs/tutorial/body.md
* Wenn der Parameter vom Typ eines **Pydantic-Modells** ist, wird er als Request**body** interpretiert. /// note | "Hinweis" FastAPI weiß, dass der Wert von `q` nicht erforderlich ist, wegen des definierten Defaultwertes `= None` Das `Union` in `Union[str, None]` wird von FastAPI nicht verwendet, aber es erlaubt Ihrem Editor, Sie besser zu unterstützen und Fehler zu erkennen. /// ## Ohne Pydantic
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006_an.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5K bytes - Viewed (0) -
docs/tr/docs/index.md
app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}") def update_item(item_id: int, item: Item):
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Aug 16 16:50:01 UTC 2024 - 21.9K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001_an.py
"path,expected_status,expected_response", [ ("/items", 200, {"q": None, "skip": 0, "limit": 100}), ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}), ("/items?q=foo&skip=5", 200, {"q": "foo", "skip": 5, "limit": 100}), ("/items?q=foo&skip=5&limit=30", 200, {"q": "foo", "skip": 5, "limit": 30}), ("/users", 200, {"q": None, "skip": 0, "limit": 100}), ], )
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006.py
response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == { "item_id": "foo", "needy": "very", "skip": 0, "limit": None, } def test_foo_no_needy(client: TestClient): response = client.get("/items/foo?skip=a&limit=b") assert response.status_code == 422 assert response.json() == IsDict( {
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/body.md
* 만약 매개변수가 (`int`, `float`, `str`, `bool` 등과 같은) **유일한 타입**으로 되어있으면, **쿼리** 매개변수로 해석될 것입니다. * 만약 매개변수가 **Pydantic 모델** 타입으로 선언되어 있으면, 요청 **본문**으로 해석될 것입니다. /// note | "참고" FastAPI는 `q`의 값이 필요없음을 알게 될 것입니다. 기본 값이 `= None`이기 때문입니다. `Union[str, None]`에 있는 `Union`은 FastAPI에 의해 사용된 것이 아니지만, 편집기로 하여금 더 나은 지원과 에러 탐지를 지원할 것입니다. /// ## Pydantic없이
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial001.py
response = client.post("/items/", json={"name": "Foo", "price": 3}) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 3, "description": None, "tax": None, } def test_post_invalid_item(): response = client.post("/items/", json={"name": "Foo", "price": "invalid price"}) assert response.status_code == 422 assert response.json() == IsDict(
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/pt/docs/how-to/separate-openapi-schemas.md
</div> Isso significa que ele **sempre terá um valor**, só que às vezes o valor pode ser `None` (ou `null` em termos de JSON). Isso quer dizer que, os clientes que usam sua API não precisam verificar se o valor existe ou não, eles podem **assumir que o campo sempre estará lá**, mas que em alguns casos terá o valor padrão de `None`. A maneira de descrever isso no OpenAPI é marcar esse campo como **obrigatório**, porque ele sempre estará lá.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Oct 24 18:52:36 UTC 2024 - 6.8K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py39.py
assert response.status_code == 200, response.text assert response.json() == { "name": "Foo", "price": 42, "description": None, "tax": None, "tags": [], } @needs_py39 @needs_pydanticv2 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 8.9K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
def get_client(): app = FastAPI() with pytest.warns(DeprecationWarning): @app.post("/items/") async def read_items( q: Annotated[str | None, Form(regex="^fixedquery$")] = None, ): if q: return f"Hello {q}" else: return "Hello World" client = TestClient(app) return client @needs_py310
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0)