Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 222 for json (0.14 sec)

  1. tests/test_path.py

        assert response.json() == "Hello World"
    
    
    def test_nonexistent():
        response = client.get("/nonexistent")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Not Found"}
    
    
    def test_path_foobar():
        response = client.get("/path/foobar")
        assert response.status_code == 200
        assert response.json() == "foobar"
    
    
    def test_path_str_foobar():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/schema-extra-example.md

    ### JSON Schema's `examples` field
    
    But then JSON Schema added an <a href="https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.5" class="external-link" target="_blank">`examples`</a> field to a new version of the specification.
    
    And then the new OpenAPI 3.1.0 was based on the latest version (JSON Schema 2020-12) that included this new field `examples`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  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 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  4. docs/bucket/replication/setup_ilm_expiry_replication.sh

    sleep 30s
    
    nprefix=$(./mc ilm rule list siteb/bucket --json | jq '.config.Rules[0].Filter.And.Prefix' | sed 's/"//g')
    ntagName1=$(./mc ilm rule list siteb/bucket --json | jq '.config.Rules[0].Filter.And.Tags[0].Key' | sed 's/"//g')
    ntagVal1=$(./mc ilm rule list siteb/bucket --json | jq '.config.Rules[0].Filter.And.Tags[0].Value' | sed 's/"//g')
    ntagName2=$(./mc ilm rule list siteb/bucket --json | jq '.config.Rules[0].Filter.And.Tags[1].Key' | sed 's/"//g')
    Shell Script
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 12:48:19 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/encoder.md

    A função não retorna um grande `str` contendo os dados no formato JSON (como uma string). Mas sim, retorna uma estrutura de dados padrão do Python (por exemplo, um `dict`) com valores e subvalores compatíveis com JSON.
    
    !!! note "Nota"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial012.py

            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"username": "Rick"}, {"username": "Morty"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

                    }
                ]
            }
        )
    
    
    @needs_py39
    def test_post_body_json(client: TestClient):
        response = client.post("/files/", json={"file": "Foo"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py

        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    @needs_py39
    def test_post_invalid_body(client: TestClient):
        data = {"foo": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  9. tests/test_annotated.py

        assert response.status_code == 200
        assert response.json() == {"foo": "bar"}
    
        response = client.get("/test1", params={"var": "baz"})
        assert response.status_code == 200
        assert response.json() == {"foo": "baz"}
    
        response = client.get("/test2")
        assert response.status_code == 200
        assert response.json() == {"foo": "bar"}
    
        response = client.get("/test2", params={"var": "baz"})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_multiple_params/test_tutorial001_py310.py

        response = client.put("/items/5?q=bar", json=None)
        assert response.status_code == 200
        assert response.json() == {"item_id": 5, "q": "bar"}
    
    
    @needs_py310
    def test_post_no_body(client: TestClient):
        response = client.put("/items/5", json=None)
        assert response.status_code == 200
        assert response.json() == {"item_id": 5}
    
    
    @needs_py310
    def test_post_id_foo(client: TestClient):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top