# Interface OS3Operation

Interface
Module
import { OS3Operation } from "@tsed/openspec"
Source/packages/specs/openspec/src/types/openspec3/OS3Operation.ts

# Overview

interface OS3Operation<Schema = OS3Schema, Parameter = OS3Parameter<Schema>, Response = OpenSpecHash<OS3Response<Schema>>> {
operationId<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>

description?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>

summary?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>

tags?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

externalDocs?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecExternalDocs.html"><span class="token">OpenSpecExternalDocs</span></a><span class="token punctuation">;</span>

parameters?<span class="token punctuation">:</span> Parameter<span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

requestBody?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/openspec3/OS3RequestBody.html"><span class="token">OS3RequestBody</span></a>&lt;<a href="/api/orm/mongoose/types/decorators/Schema.html"><span class="token">Schema</span></a>&gt;<span class="token punctuation">;</span>

responses<span class="token punctuation">:</span> <a href="/api/platform/common/types/decorators/params/Response.html"><span class="token">Response</span></a><span class="token punctuation">;</span>

deprecated?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>

security?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecSecurity.html"><span class="token">OpenSpecSecurity</span></a><span class="token punctuation">;</span>

servers?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/openspec3/OS3Server.html"><span class="token">OS3Server</span></a><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

callbacks?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/openspec3/OS3Callbacks.html"><span class="token">OS3Callbacks</span></a>&lt;<a href="/api/orm/mongoose/types/decorators/Schema.html"><span class="token">Schema</span></a>&gt;<span class="token punctuation">;</span>

}

# Members

operationId: string;

Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.


description?: string;

A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.


summary?: string;

A short summary of what the operation does.


tags?: string[];

A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.


externalDocs?: OpenSpecExternalDocs;

Additional external documentation for this operation.


parameters?: Parameter[];

A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and (location)[https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterIn]. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object's components/parameters.


requestBody?: OS3RequestBody<Schema>;

The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.


responses: Response;

The list of possible responses as they are returned from executing this operation.


deprecated?: boolean;

Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.


security?: OpenSpecSecurity;

A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.


servers?: OS3Server[];

An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.


callbacks?: OS3Callbacks<Schema>;

A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.