Skip to main content

GetJsonSchemaHandler

Handler to call into the next JSON schema generation function.

Attributes

AttributeTypeDescription
modeJsonSchemaModeJson schema mode, can be validation or serialization.

Methods


resolve_ref_schema()

@classmethod
def resolve_ref_schema(
maybe_ref_json_schema: JsonSchemaValue
) - > JsonSchemaValue

Get the real schema for a {"$ref": ...} schema. If the schema given is not a $ref schema, it will be returned as is. This means you don't have to check before calling this function.

Parameters

NameTypeDescription
maybe_ref_json_schemaJsonSchemaValueA JsonSchemaValue which may be a $ref schema that needs to be dereferenced.

Returns

TypeDescription
JsonSchemaValueA JsonSchemaValue that has no $ref.