MCPcopy
hub / github.com/pydantic/pydantic / json_schema_extra

Function json_schema_extra

tests/test_json_schema.py:2783–2786  ·  view source on GitHub ↗
(schema, model_class)

Source from the content-addressed store, hash-verified

2781@pytest.mark.skip_json_schema_validation(reason='Custom type used.')
2782def test_typeddict_with__callable_json_schema_extra():
2783 def json_schema_extra(schema, model_class):
2784 schema.pop('properties')
2785 schema['type'] = 'override'
2786 assert model_class is Model
2787
2788 class Model(TypedDict):
2789 __pydantic_config__ = ConfigDict(title='Test', json_schema_extra=json_schema_extra) # type: ignore

Callers 1

_update_class_schemaMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected