operation-optional-parameters-after-required-parameters
Overview
This rule belongs to the openapi-v3-codegen-linting
ruleset and states that:
For code generation purposes, it is recommended that optional parameters should be defined at the end of the Operation Object parameters
list and not before or between required parameters.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Operation object parameters are out of order. |
Code | OPENAPI3CODEGEN_L202 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Operations |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi semantic linting apimatic optional required parameters parameter operation |
Suggested Fixes
- Ensure that the parameters are in order.
- Place all required parameters first.
- Place all optional parameters at the end.