Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for contentMediaType (0.1 seconds)

  1. tests/test_request_params/test_file/test_optional_list.py

                    "anyOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "contentMediaType": "application/octet-stream",
                            },
                        },
                        {"type": "null"},
                    ],
                    "title": "P",
                }
            },
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 21 13:01:31 GMT 2026
    - 10.8K bytes
    - Click Count (0)
  2. tests/test_request_params/test_file/test_optional.py

        assert app.openapi()["components"]["schemas"][body_model_name] == {
            "properties": {
                "p": {
                    "anyOf": [
                        {"type": "string", "contentMediaType": "application/octet-stream"},
                        {"type": "null"},
                    ],
                    "title": "P",
                }
            },
            "title": body_model_name,
            "type": "object",
        }
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 21 13:01:31 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  3. tests/test_request_params/test_file/test_list.py

            "properties": {
                "p": {
                    "type": "array",
                    "items": {
                        "type": "string",
                        "contentMediaType": "application/octet-stream",
                    },
                    "title": "P",
                },
            },
            "required": ["p"],
            "title": body_model_name,
            "type": "object",
        }
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 21 13:01:31 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  4. tests/test_request_params/test_file/test_required.py

        assert app.openapi()["components"]["schemas"][body_model_name] == {
            "properties": {
                "p": {
                    "title": "P",
                    "type": "string",
                    "contentMediaType": "application/octet-stream",
                },
            },
            "required": ["p"],
            "title": body_model_name,
            "type": "object",
        }
    
    
    @pytest.mark.parametrize(
        "path",
        [
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 21 13:01:31 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  5. fastapi/datastructures.py

        @classmethod
        def __get_pydantic_json_schema__(
            cls, core_schema: Mapping[str, Any], handler: GetJsonSchemaHandler
        ) -> dict[str, Any]:
            return {"type": "string", "contentMediaType": "application/octet-stream"}
    
        @classmethod
        def __get_pydantic_core_schema__(
            cls, source: type[Any], handler: Callable[[Any], Mapping[str, Any]]
        ) -> Mapping[str, Any]:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 5.2K bytes
    - Click Count (0)
  6. fastapi/openapi/utils.py

                            )
                            item_schema["required"] = ["data"]
                            item_schema["properties"]["data"] = {
                                "type": "string",
                                "contentMediaType": "application/json",
                                "contentSchema": content_schema,
                            }
                        sse_content["itemSchema"] = item_schema
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 25.6K bytes
    - Click Count (0)
  7. fastapi/_compat/v2.py

        # and dropping support for any version of Pydantic before that one (so, in a very long time)
        def bytes_schema(self, schema: CoreSchema) -> JsonSchemaValue:
            json_schema = {"type": "string", "contentMediaType": "application/octet-stream"}
            bytes_mode = (
                self._config.ser_json_bytes
                if self.mode == "serialization"
                else self._config.val_json_bytes
            )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  8. fastapi/openapi/models.py

        # A Vocabulary for the Contents of String-Encoded Data
        contentEncoding: str | None = None
        contentMediaType: str | None = None
        contentSchema: Optional["SchemaOrBool"] = None
        # Ref: JSON Schema Validation 2020-12: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-a-vocabulary-for-basic-meta
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 14.2K bytes
    - Click Count (0)
  9. docs/en/docs/release-notes.md

    ## 0.129.1 (2026-02-21)
    
    ### Fixes
    
    * ♻️ Fix JSON Schema for bytes, use `"contentMediaType": "application/octet-stream"` instead of `"format": "binary"`. PR [#14953](https://github.com/fastapi/fastapi/pull/14953) by [@tiangolo](https://github.com/tiangolo).
    
    ### Docs
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Apr 03 12:07:04 GMT 2026
    - 631K bytes
    - Click Count (0)
Back to Top