Skip to main content

no-optional-field-parameters-in-non-body-http-methods

Overview

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

HTTP methods like GET do not support a request body therefore, such endpoints cannot allow optional field parameters through the "HasOptionalFieldParams" flag.

PropertyValue
EnabledYes
Maximum SeverityError
MessageOptional field parameters found in an endpoint which has a HTTP method assigned that does not support these parameters.
CodeAPIMATICPRE_V204
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Parameters
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic form parameter endpoint setting endpoint

Suggested Fixes

  • Remove all optional field parameters from the endpoint.
  • Change HTTP method to one that supports a request body.

For More Information