Skip to main content

generate_arguments_schema

Generate the schema for the arguments of a function.

def generate_arguments_schema(
func: Callable[..., Any],
schema_type: Literal['arguments', 'arguments-v3'] = 'arguments-v3',
parameters_callback: Callable[[int, str, Any], Literal['skip'] | None] | None = None,
config: ConfigDict | None = None
) - > CoreSchema

Generate the schema for the arguments of a function.

Parameters

NameTypeDescription
funcCallable[..., Any]The function to generate the schema for.
schema_typeLiteral['arguments', 'arguments-v3'] = 'arguments-v3'The type of schema to generate.
parameters_callback`Callable[[int, str, Any], Literal['skip']None]
config`ConfigDictNone` = None

Returns

TypeDescription
CoreSchemaThe generated schema.