Pydantic · Type Alias
WithJsonSchema
WithJsonSchema lets you replace Pydantic’s generated JSON Schema for a type. Use it inside Annotated, especially for types without a default schema.
Last updated
Syntax
WithJsonSchema(json_schema: JsonSchemaValue, mode: JsonSchemaMode | None = None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
SkipJsonSchemaFieldAnnotatedjson_schema_input_type__get_pydantic_json_schema__