Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageOperation object parameters are out of order.
CodeOPENAPI3CODEGEN_L202
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Operations
Products ImpactedCode Generation, Developer Experience Portal
Tagscode 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.

For More Information