link-operation-id-and-ref-are-mutually-exclusive
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
The properties operationId
and operationRef
in Link Object are mutually exclusive. This means that in a Link Object instance, only one of these properties must be present at a time but not both.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Link Object contains both operationId and operationRef properties. |
Code | OPENAPI3STANDARDS_V236 |
Type | Validation |
Rule System | Semantic |
Broad Category | Links |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation operation id operation ref ref link operation |
Suggested Fixes
- Remove either the
operationId
oroperationRef
property from the Link Object.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#link-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/