valid-link-request-body-expression
Overview
This rule belongs to the openapi-v3-syntax-validation
ruleset and states that:
Link request body value is a string used for determining the request body value that needs to be sent as part of the callback request. This value is capable of supporting runtime expressions which are evaluated in the context of a runtime HTTP request/response. The value must use valid runtime expression syntax. Expressions can be embedded into string values by surrounding the expression with {} curly braces.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Invalid link request body value found. |
Code | OPENAPI3SYNTAX_V102 |
Type | Validation |
Rule System | Syntax |
Broad Category | Links |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi syntax validation runtime expression expression request body link |
Suggested Fixes
- Ensure that if you are using runtime expressions in your request body value string, the expressions follow valid syntax rules.
- Ensure that all expressions start and end with a curly brace.
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#runtime-expressions
- 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#runtime-expressions
- https://tools.ietf.org/html/rfc5234
- https://www.rfc-editor.org/rfc/rfc6901
- https://www.rfc-editor.org/rfc/rfc7159#section-7
- https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/