pydantic_openapi_helper.helper module

Helper functions.

pydantic_openapi_helper.helper.clean_schemas(schemas, add_tags=True, add_discriminator=False, add_type=False)[source]
pydantic_openapi_helper.helper.create_tag(name)[source]

Create a viewer tag from a class name.

This tag is specific to redocly and will be ignored by generators and other viewers.

pydantic_openapi_helper.helper.inherit_fom_basemodel(model: dict)[source]

Change the schema to inherit from _OpenAPIGenBaseModel.

pydantic_openapi_helper.helper.set_format(p)[source]

Set format for numbers and integers.

This is helpful for dotnet code generator.