MCPcopy
hub / github.com/pydantic/pydantic / any_schema

Method any_schema

pydantic/json_schema.py:627–636  ·  view source on GitHub ↗

Generates a JSON schema that matches any value. Args: schema: The core schema. Returns: The generated JSON schema.

(self, schema: core_schema.AnySchema)

Source from the content-addressed store, hash-verified

625 raise RuntimeError('Cannot generate schema for invalid_schema. This is a bug! Please report it.')
626
627 def any_schema(self, schema: core_schema.AnySchema) -> JsonSchemaValue:
628 """Generates a JSON schema that matches any value.
629
630 Args:
631 schema: The core schema.
632
633 Returns:
634 The generated JSON schema.
635 """
636 return {}
637
638 def none_schema(self, schema: core_schema.NoneSchema) -> JsonSchemaValue:
639 """Generates a JSON schema that matches `None`.

Callers 15

SecretClass · 0.80
_SecretFieldClass · 0.80
_BaseUrlClass · 0.80
_BaseMultiHostUrlClass · 0.80
typed_dict_schemaMethod · 0.80
json_schemaMethod · 0.80
match_typeMethod · 0.80
_tuple_schemaMethod · 0.80

Calls

no outgoing calls