valid-operation-ref
Overview
This rule belongs to the openapi-v3-syntax-validation
ruleset and states that:
operationRef must be a valid relative or absolute URI reference to an OAS operation. In the use of operationRef, the escaped forward-slash is necessary when using JSON references.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | operationRef value is not a valid URI. |
Code | OPENAPI3SYNTAX_V100 |
Type | Validation |
Rule System | Syntax |
Broad Category | Links |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi syntax validation uri operation ref operation link |
Suggested Fixes
- Ensure that the value of operationRef is a valid URI.
- Ensure that the value of operationRef is not null or empty.
- operationRef can either be a relative or absolute URI.
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.1.0.md#relative-references-in-uris
- 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/