Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 791 for JSON (0.19 sec)

  1. tests/test_openapi_examples.py

                },
            },
        ),
    ):
        return item
    
    
    @app.get("/path_examples/{item_id}")
    def path_examples(
        item_id: str = Path(
            examples=[
                "json_schema_item_1",
                "json_schema_item_2",
            ],
            openapi_examples={
                "Path One": {
                    "summary": "Path One Summary",
                    "description": "Path One Description",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 17K bytes
    - Viewed (0)
  2. tests/test_openapi_separate_input_output_schemas.py

        client_no = get_app_client(separate_input_output_schemas=False)
        response = client.post("/items/", json={"name": "Plumbus"})
        response2 = client_no.post("/items/", json={"name": "Plumbus"})
        assert response.status_code == response2.status_code == 200, response.text
        assert (
            response.json()
            == response2.json()
            == {"name": "Plumbus", "description": None, "sub": None}
        )
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  3. tests/test_dependency_duplicates.py

    
    def test_sub_duplicates():
        response = client.post("/with-duplicates-sub", json={"data": "myitem"})
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"data": "myitem"},
            [{"data": "myitem"}, {"data": "myitem"}],
        ]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  4. tests/test_modules_same_name_body/test_main.py

        response = client.post("/b/compute/", json=data)
        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_b_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/b/compute/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_generate_clients/test_tutorial003.py

        response = client.post("/items/", json={"name": "Foo", "price": 5})
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Item received"}
    
    
    def test_post_users():
        response = client.post(
            "/users/", json={"username": "Foo", "email": "******@****.***"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "User received"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/encoder.md

    Es wird also kein großer `str` zurückgegeben, der die Daten im JSON-Format (als String) enthält. Es wird eine Python-Standarddatenstruktur (z. B. ein `dict`) zurückgegeben, mit Werten und Unterwerten, die alle mit JSON kompatibel sind.
    
    !!! note "Hinweis"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:07:21 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  7. docs/ko/docs/tutorial/encoder.md

    Pydantic 모델과 같은 객체를 받고 JSON 호환 가능한 버전으로 반환합니다:
    
    ```Python hl_lines="5  22"
    {!../../../docs_src/encoder/tutorial001.py!}
    ```
    
    이 예시는 Pydantic 모델을 `dict`로, `datetime` 형식을 `str`로 변환합니다.
    
    이렇게 호출한 결과는 파이썬 표준인 <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>로 인코딩 할 수 있습니다.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Dec 08 15:43:31 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
Back to top