Skip to main content



This rule belongs to the apimatic-post-processing-codegen-validation ruleset and states that:

For code generation purposes, it is important that optional parameters should be defined at the end of the endpoint parameters list and not before or between required parameters. If this is not the case by default, the parameters may be automatically sorted to get the required order. If the PreserveParameterOrder CodeGen setting is enabled, the original order will be relatively more preserved.

Maximum SeverityWarning
MessageEndpoint parameters have been sorted with respect to their optional/required properties, for code generation purposes.
Rule SystemSemantic
Broad CategoryEndpoints
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic postprocessing code generation validation order optional parameter endpoint

Suggested Fixes

  • To avoid this issue, define the optional parameters after the required ones, in the endpoint parameters list.
  • Enable PreserveParameterOrder CodeGen setting to preserve original parameter order as much as possible.

For More Information