Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 259 for properties (0.19 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 Apr 28 07:19:10 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_response_model/test_tutorial003.py

                            # TODO: remove when deprecating Pydantic v1
                            ["username", "email"],
                        ),
                        "type": "object",
                        "properties": {
                            "username": {"title": "Username", "type": "string"},
                            "email": {
                                "title": "Email",
                                "type": "string",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  4. tests/test_union_inherited_body.py

                }
            },
            "components": {
                "schemas": {
                    "Item": {
                        "title": "Item",
                        "type": "object",
                        "properties": {
                            "name": IsDict(
                                {
                                    "title": "Name",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial001_03_an.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)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

                "schemas": {
                    "Item": {
                        "title": "Item",
                        "required": ["name", "price"],
                        "type": "object",
                        "properties": {
                            "name": {"title": "Name", "type": "string"},
                            "description": IsDict(
                                {
                                    "title": "Description",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py

                "schemas": {
                    "Item": {
                        "title": "Item",
                        "required": ["name", "price"],
                        "type": "object",
                        "properties": {
                            "name": {"title": "Name", "type": "string"},
                            "description": IsDict(
                                {
                                    "title": "Description",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial003_py310.py

                "schemas": {
                    "Item": {
                        "title": "Item",
                        "required": ["name", "price"],
                        "type": "object",
                        "properties": {
                            "name": {"title": "Name", "type": "string"},
                            "description": IsDict(
                                {
                                    "title": "Description",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial003.py

                    "Body_create_files_files__post": {
                        "title": "Body_create_files_files__post",
                        "required": ["files"],
                        "type": "object",
                        "properties": {
                            "files": {
                                "title": "Files",
                                "type": "array",
                                "items": {"type": "string", "format": "binary"},
    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)
  10. tests/test_tutorial/test_openapi_webhooks/test_tutorial001.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 Oct 20 09:00:44 GMT 2023
    - 4.4K bytes
    - Viewed (2)
Back to top