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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Type specified is not applicable to parameters. |
Code | APIMATICPRE_V209 |
Type | Validation |
Rule System | Semantic |
Broad Category | Endpoint Parameters |
Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
Tags | preliminary 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.