interface ApiRouteOpenApi {
    components?: SubOptionalOrFalse<ComponentsObject>;
    deprecated?: boolean;
    responses?: OptionalOrFalse<ResponsesObject>;
    tags?: openApiTag[];
}

Hierarchy (view full)

Properties

deprecated?: boolean

set this endpoint as deprecated

specify all responses of the operation . Merged by levels

tags?: openApiTag[]

Allow to define tags of the https://spec.openapis.org/oas/v3.1.0#operation-object|Operation

  • Use a tagObject to define it ( follow by his name to use it )
  • use null to remove all tags added previously (by merge from other levels)
  • use a string to use a tag

tags are unique in all the openApi, and identified by his name . Defining two times the same tag will merge them

Example

// setting tags to all children
{
tags: ['tags1', 'tags2']
}

Example

// remove parents tags, and set tags to children
{
tags: [null, 'tags3', 'tags4']
}

Example

// add tag with description, and use it on children
{
tags: [
{
name: "tags1";
description: "this is the first example tag";
externalDocs: "https://doc.example.com/tags/tags1";
},
'tags1'
]
}