Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 259 for properties (0.14 sec)

  1. tests/test_additional_properties.py

    app = FastAPI()
    
    
    class Items(BaseModel):
        items: Dict[str, int]
    
    
    @app.post("/foo")
    def foo(items: Items):
        return items.items
    
    
    client = TestClient(app)
    
    
    def test_additional_properties_post():
        response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}})
        assert response.status_code == 200, response.text
        assert response.json() == {"foo": 1, "bar": 2}
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  2. tests/test_additional_properties_bool.py

            "components": {
                "schemas": {
                    "Foo": {
                        "properties": {},
                        "additionalProperties": False,
                        "type": "object",
                        "title": "Foo",
                    },
                    "HTTPValidationError": {
                        "properties": {
                            "detail": {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  3. tests/test_request_body_parameters_media_type.py

                        "type": "object",
                        "properties": {"data": {"$ref": "#/components/schemas/Product"}},
                    },
                    "Body_create_shop_shops_post": {
                        "title": "Body_create_shop_shops_post",
                        "required": ["data"],
                        "type": "object",
                        "properties": {
                            "data": {"$ref": "#/components/schemas/Shop"},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_additional_responses/test_tutorial001.py

                        "type": "object",
                        "properties": {"message": {"title": "Message", "type": "string"}},
                    },
                    "ValidationError": {
                        "title": "ValidationError",
                        "required": ["loc", "msg", "type"],
                        "type": "object",
                        "properties": {
                            "loc": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 4.3K bytes
    - Viewed (1)
  5. tests/test_tutorial/test_additional_responses/test_tutorial003.py

                        "type": "object",
                        "properties": {"message": {"title": "Message", "type": "string"}},
                    },
                    "ValidationError": {
                        "title": "ValidationError",
                        "required": ["loc", "msg", "type"],
                        "type": "object",
                        "properties": {
                            "loc": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  6. tests/test_union_body.py

                        "required": ["price"],
                        "type": "object",
                        "properties": {"price": {"title": "Price", "type": "integer"}},
                    },
                    "Item": {
                        "title": "Item",
                        "type": "object",
                        "properties": IsDict(
                            {
                                "name": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_models/test_tutorial003_py310.py

                            # TODO: remove when deprecating Pydantic v1
                            ["description", "size"],
                        ),
                        "type": "object",
                        "properties": {
                            "description": {"title": "Description", "type": "string"},
                            "type": {"title": "Type", "type": "string", "default": "plane"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial001_03.py

                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file"],
                        "type": "object",
                        "properties": {
                            "file": {
                                "title": "File",
                                "type": "string",
                                "description": "A file read as bytes",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

                }
            },
            "components": {
                "schemas": {
                    "Item": {
                        "type": "object",
                        "title": "Item",
                        "properties": {
                            "name": {
                                "anyOf": [{"type": "string"}, {"type": "null"}],
                                "title": "Name",
                            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py

                            },
                        },
                    }
                }
            },
            "components": {
                "schemas": {
                    "HTTPValidationError": {
                        "properties": {
                            "detail": {
                                "items": {"$ref": "#/components/schemas/ValidationError"},
                                "type": "array",
                                "title": "Detail",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.4K bytes
    - Viewed (0)
Back to top