OpenAPI Best Practices

operation-operationId-hyphen-case

general > operation-operationId-hyphen-case


Guidance

Make the value lower-hyphen-case. For example, create-polygon, search-by-polygon, or filter-companies.

Message

The '{{apiContract.operationId}}' operation ID must be a lower-hyphen-case string.

Examples

valid

paths:
  /events:
    get:
      operationId: get-events
      summary: Get a list of events
      description: Returns a list of events that match the specified criteria
      responses:
        '200':
          description: OK

invalid

paths:
  /events:
    get:
      operationId: thisIsActuallyCamelCase
      summary: Get a list of events
      description: Returns a list of events that match the specified criteria
      responses:
        '200':
          description: OK

Applies to Operation

Constraint

Type: Declarative Validation
TypeRuleset
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onNov 29, 2023
Asset overview

Asset versions for 1.1.x

Asset versions
VersionActions
1.1.0

Tags