Skip to main content

valid-parameter-primitive-type

Overview

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

Some types like "Binary", "Void" and "HttpResponse" are not applicable to parameters and, therefore, should not be used in parameter definitions.

PropertyValue
EnabledYes
Maximum SeverityError
MessageType specified is not applicable to parameters.
CodeAPIMATICPRE_V209
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Parameters
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic type primitive type scalar type parameter endpoint

Suggested Fixes

  • Use only valid and supported primitive types for parameters e.g. String, Number, Long, Precision, Boolean, etc.
  • Use type "File" instead of "Binary".
  • Use the Optional or Nullable flags to show that parameter can have no or null value.

For More Information