MCPcopy
hub / github.com/pydantic/pydantic / generate

Method generate

tests/test_json_schema.py:4657–4660  ·  view source on GitHub ↗
(self, schema, mode='validation')

Source from the content-addressed store, hash-verified

4655def test_override_generate_json_schema():
4656 class MyGenerateJsonSchema(GenerateJsonSchema):
4657 def generate(self, schema, mode='validation'):
4658 json_schema = super().generate(schema, mode=mode)
4659 json_schema['$schema'] = self.schema_dialect
4660 return json_schema
4661
4662 class MyBaseModel(BaseModel):
4663 @classmethod

Calls

no outgoing calls

Tested by

no test coverage detected