Skip to main content

pre-defined-operation-for-link-operation-id

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

The property operationId in the Link Object must refer uniquely to a pre-existing Operation Object in the current API document.

PropertyValue
EnabledYes
Maximum SeverityError
MessageOperation Object referenced by the Link Object via operationId does not exist.
CodeOPENAPI3STANDARDS_V238
TypeValidation
Rule SystemSemantic
Broad CategoryLinks
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation id operation id operation link

Suggested Fixes

  • Ensure that the value of operation's id is not null or empty.
  • Make sure that the id referenced in the Link Object matches exactly with the operationId of an Operation Object in the current API document. Id is compared in a case-sensitive manner.
  • Make sure that the Operation Object you are referencing is already defined in the current API document.
  • Ensure that there is only one instance of an operation with the given operationId i.e. the operationId is unique among all operations in the document.

For More Information