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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Optional field parameters found in an endpoint which has a HTTP method assigned that does not support these parameters. |
| Code | APIMATICPRE_V204 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Endpoint Parameters |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary 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.