OpenAPI Operation Object Fields

All OpenAPI 3.1 Operation object fields with type, required flag and description.

Searchable OpenAPI 3.1 Operation Object field reference covering tags, parameters, requestBody, responses, callbacks, security and servers with each field's type and requirement.

What is the OpenAPI Operation Object?

It describes a single API operation on a path — typically one HTTP method such as GET or POST. It lives under a Path Item Object keyed by the method name and holds the parameters, request body, responses and metadata for that call.

The OpenAPI 3.1 Operation Object

In an OpenAPI document, each HTTP method under a path is an Operation Object. It bundles the parameters, request body, possible responses and metadata for one call. This reference lists every field of the 3.1 Operation Object with its JSON type and requirement, plus a live search.

How it works

An Operation sits inside a Path Item, keyed by the lowercase method name:

paths:
  /pets/{id}:
    get:
      operationId: getPet
      tags: [pets]
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses:
        "200":
          description: A pet

Only the responses field is required. The parameters array is merged with any path-level parameters; requestBody replaces the older body parameter from Swagger 2.0; and callbacks define out-of-band webhooks the API may send.

Tips and notes

  • Set deprecated: true to flag an operation for removal without deleting it.
  • Give every operation a unique operationId so generators produce clean names.
  • An operation-level security array overrides the document-level default.
  • servers on an operation overrides the path and root server lists.