Skip to content

[T] ExtensionDecorator

type ExtensionDecorator: (context, target, key, value) => void;

Attach some custom data to the OpenAPI element generated from this type.

Parameters

ParameterTypeDescription
contextDecoratorContext-
targetType-
keystringExtension key. Must start with x-
valueTypeExtension value.

Returns

void

Example

@extension("x-custom", "My value")
@extension("x-pageable", {nextLink: "x-next-link"})
op read(): string;