Skip to content

core.open_api ​

Overview ​

Conditional drf-spectacular wrappers for OpenAPI schema generation.

Classes ​

conditional_extend_schema_decorator ​

Return a decorator that applies drf-spectacular's extend_schema, or returns the decorated function unchanged when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_decorator(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:47

conditional_extend_schema_field_decorator ​

Return a decorator that applies drf-spectacular's extend_schema_field, or returns the decorated function unchanged when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_field_decorator(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:69

conditional_extend_schema_field_func ​

Return drf-spectacular's extend_schema_field decorator built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_field_func(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:149

conditional_extend_schema_func ​

Return drf-spectacular's extend_schema decorator built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_func(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:136

conditional_extend_schema_serializer_decorator ​

Return a decorator that applies drf-spectacular's extend_schema_serializer, or returns the decorated class unchanged when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_serializer_decorator(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:91

conditional_extend_schema_serializer_func ​

Return drf-spectacular's extend_schema_serializer decorator built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_serializer_func(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:162

conditional_extend_schema_view_decorator ​

Return a decorator that applies drf-spectacular's extend_schema_view, or returns the decorated view unchanged when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_view_decorator(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:113

conditional_extend_schema_view_func ​

Return drf-spectacular's extend_schema_view decorator built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_extend_schema_view_func(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:175

conditional_inline_serializer ​

Return a serializer built by drf-spectacular's inline_serializer, or None when drf-spectacular is not installed.

Signature ​

conditional_inline_serializer(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:284

conditional_open_api_callback ​

Return a drf-spectacular OpenApiCallback built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_callback(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:240

conditional_open_api_example ​

Return a drf-spectacular OpenApiExample built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_example(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:188

conditional_open_api_parameter ​

Return a drf-spectacular OpenApiParameter built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_parameter(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:201

conditional_open_api_request ​

Return a drf-spectacular OpenApiRequest built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_request(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:227

conditional_open_api_response ​

Return a drf-spectacular OpenApiResponse built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_response(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:214

conditional_open_api_types ​

Return drf-spectacular's OpenApiTypes enum, or an AlwaysGetNone object whose attributes are all None when drf-spectacular is not installed.

Signature ​

conditional_open_api_types()

Source ​

server/vueda/core/open_api.py:271

conditional_open_api_webhook ​

Return a drf-spectacular OpenApiWebhook built from the arguments, or None when drf-spectacular is not installed.

Signature ​

conditional_open_api_webhook(args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
argsno
kwargsno

Source ​

server/vueda/core/open_api.py:253

get_components_by_ref ​

Return a deep copy of each component schema in components named by ref_strings, keyed by ref string.

Each ref string ends in /<component type>/<component name>, as in #/components/schemas/Cart.

Signature ​

get_components_by_ref(components, ref_strings)

Parameters ​

NameTypeRequiredDefaultDescription
componentsyes
ref_stringsyes

Source ​

server/vueda/core/open_api.py:674

recursive_replace_refs ​

Replace each $ref in data that names a schema in refs_schema with that schema's keys, in place, descending into nested dicts but not lists.

Signature ​

recursive_replace_refs(data, refs_schema)

Parameters ​

NameTypeRequiredDefaultDescription
datayes
refs_schemayes

Source ​

server/vueda/core/open_api.py:693

replace_refs_with_schema ​

Inline the component schemas named by component_ref_strings wherever data refers to them by $ref, editing data in place.

Refs between those components are inlined first, so the copied schemas are self-contained.

Signature ​

replace_refs_with_schema(components, data, component_ref_strings)

Parameters ​

NameTypeRequiredDefaultDescription
componentsyes
datayes
component_ref_stringsyes

Source ​

server/vueda/core/open_api.py:709

Source ​

server/vueda/core/open_api.py