Skip to main content

constant-parameter-cannot-be-optional

Overview

This rule belongs to the apimatic-preliminary-validation ruleset and states that:

Constant parameters cannot be declared optional.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEndpoint has an optional parameter which is also declared as a constant.
CodeAPIMATICPRE_V212
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Parameters
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic parameter constant endpoint

Suggested Fixes

  • Set the parameter as a required parameter.
  • Make the parameter non-constant.

For More Information