interface AliasRouteOpenApi {
    components?: SubOptionalOrFalse<ComponentsObject>;
    deprecated?: boolean;
    description?: string;
    externalDocs?: ExternalDocumentationObject;
    operationId?: string;
    parameters?: (Omit<ParameterObject, "in"> & {
        in: "cookie" | "header";
    } & (Required<Pick<ParameterObject, "schema">> | Required<Pick<ParameterObject, "content">>))[];
    pathParameters?: Omit<ParameterObject, "in">[];
    queryParameters?: Omit<ParameterObject, "in">[];
    requestBody?: RequestBodyObject;
    response?: MediaTypeObject | actionOpenApiResponse;
    responses?: OptionalOrFalse<ResponsesObject>;
    security?: SecurityRequirementObject[];
    servers?: ServerObject[];
    summary?: string;
    tags?: openApiTag[];
}

Hierarchy (view full)

Properties

deprecated?: boolean

set this endpoint as deprecated

description?: string

add a description to this operation

add an external documentation to this operation

operationId?: string

add an operation id to this operation

parameters?: (Omit<ParameterObject, "in"> & {
    in: "cookie" | "header";
} & (Required<Pick<ParameterObject, "schema">> | Required<Pick<ParameterObject, "content">>))[]

allow to pass header or cookies parameters

pathParameters?: Omit<ParameterObject, "in">[]

allow to bypass the query generation from params . Specify it yourself

queryParameters?: Omit<ParameterObject, "in">[]

allow to bypass the query generation from params . Specify it yourself

requestBody?: RequestBodyObject

allow to bypass the generation from params . Specify it yourself

can be used to fastly declare the 200 answer can be directly a Media Type Object so it will reuse the default contentType or an object specifying the type and the media

specify all responses of the operation . Merged by levels

security?: SecurityRequirementObject[]

specify the security needed to call this endpoint

servers?: ServerObject[]

add a list of servers to this operation

summary?: string

add a summary to this operation

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'
]
}