Remote operation information.

OpenApi.IOperation represents a RESTful API operation provided by the remote server.

interface IOperation {
    deprecated?: boolean;
    description?: string;
    operationId?: string;
    parameters?: OpenApi.IOperation.IParameter[];
    requestBody?: OpenApi.IOperation.IRequestBody;
    responses?: Record<string, OpenApi.IOperation.IResponse>;
    security?: Record<string, string[]>[];
    servers?: OpenApi.IServer[];
    summary?: string;
    tags?: string[];
    "x-samchon-accessor"?: string[];
    "x-samchon-controller"?: string;
    "x-samchon-human"?: boolean;
}

Properties

deprecated?: boolean

Flag for indicating this operation is deprecated.

description?: string

A verbose explanation of the operation behavior.

operationId?: string

Unique string used to identify the operation.

List of parameters that are applicable for this operation.

The request body applicable for this operation.

responses?: Record<string, OpenApi.IOperation.IResponse>

The list of possible responses as they are returned from executing this operation. Its key is the HTTP status code, and the value is the metadata of the response in the HTTP status code.

security?: Record<string, string[]>[]

List of securities and their scopes that are required for execution.

When this property is configured, the RESTful API operation requires the matching security value for execution. Its key means the security key matching OpenApi.IDocument.security.

The value means scopes required for the security key when the security type is OpenApi.ISecurityScheme.IOAuth2. Otherwise, if the target security type is not OpenApi.ISecurityScheme.IOAuth2, the value will be an empty array.

servers?: OpenApi.IServer[]

A list of servers providing this API operation.

summary?: string

A short summary of what the operation does.

tags?: string[]

Tags for API documentation control.

"x-samchon-accessor"?: string[]

Accessor of the operation.

If you configure this property, the assigned value will be used as IHttpMigrateRoute.accessor. Also, it can be used as the IHttpLlmFunction.name by joining with . character in the LLM function calling application.

Note that the x-samchon-accessor value must be unique in the entire OpenAPI document operations. If there are duplicated x-samchon-accessor values, IHttpMigrateRoute.accessor will ignore all duplicated x-samchon-accessor values and generate the IHttpMigrateRoute.accessor by itself.

"x-samchon-controller"?: string

Controller of the operation.

If you configure this property, the assigned value will be utilized as the controller name in the OpenAPI generator library like @nestia/editor and @nestia/migrate.

Also, if x-samchon-accessor has been configured, its last element will be used as the controller method (function) name. Of course, the OpenAPI document generator @nestia/sdk fills both of them.

"x-samchon-human"?: boolean

Flag for indicating this operation is human-only.

If this property value is true, the HttpLlm.application function will not convert this operation schema into the LLM function calling schema that is represented by the IHttpLlmFunction interface.