Customizing OpenAPI Definitions

Operation summary

To populate operation.summary, set the header X-OpenAPI-Summary in your response.

Example

Ruby on Rails Controller

class AccountActivationsController < ApplicationController
  def edit
    response.headers['X-OpenAPI-Summary'] = 'Activate the account of an existing user'

openapi.yaml

/account_activations/{id}/edit:
    get:
      responses:
        '302':
          content: {}
          description: Found
      parameters:
        - name: email
          in: query
          schema:
            type: string
        - name: id
          in: path
          schema:
            type: string
          required: true
      summary: Activate the account of an existing user

Was this page helpful? thumb_up Yes thumb_down No
Thank you for your feedback!