Skip to main content

definitions_schema

Build a schema that contains both an inner schema and a list of definitions which can be used within the inner schema.

def definitions_schema(
schema: CoreSchema,
definitions: list[CoreSchema]
) - > DefinitionsSchema

Build a schema that contains both an inner schema and a list of definitions which can be used within the inner schema.

Parameters

NameTypeDescription
schemaCoreSchemaThe primary inner schema that may contain references to the provided definitions.
definitionslist[CoreSchema]A list of core schemas that serve as reusable definitions, typically identified by unique reference strings.

Returns

TypeDescription
DefinitionsSchemaA schema object of type 'definitions' containing the inner schema and its associated reference definitions.