unique-callback-expression
Overview
This rule belongs to the openapi-v3-standards-validation ruleset and states that:
Callback Object keys are patterned fields that must have unique values. The keys represent the expression which is evaluated at runtime to identify a URL to use for the callback operation.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Duplicate callback expression entry found. |
| Code | OPENAPI3STANDARDS_V215 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Callbacks |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi standards semantic validation callbacks expression |
Suggested Fixes
- Remove duplicate callback expression entries from the Callback Object.
- Callback expressions are compared in a case-sensitive manner.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#patterned-fields-2
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#format
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#patterned-fields-2
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#callback-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#format
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/