_a: str field_b: bool json_schema = core_schema.json_schema(schema=dict_schema) schema = core_schema.model_schema(cls=MyModel, schema=json_schema) v = SchemaValidator(schema) m = v.validate_python('{"field_a": "hello", "field_b": true}') assert isinstance(m, MyModel) ``` Args: schema: The schema to use for the JSON schema ref: optional unique identifier of the schema, used to reference the schema in other places metadata: Any other information you want to include with the schema, not used by pydantic-core serialization: Custom serialization schema Ú