no-body-or-form-parameter-in-get-method-operation
Overview
This rule belongs to the swagger-v1-validation ruleset and states that:
An operation with GET method must not define a parameter with paramType set as body or form in the parameters list. This is because such methods do not expect a request body and, therefore, all related information will be automatically ignored during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Warning |
| Message | Body/Form parameter found in operation with GET method. |
| Code | SWAGGER1_V502 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Operations |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger1 swagger semantic validation get body form parameter operation request body |
Suggested Fixes
- Remove all parameters with
paramTypeset asbodyorformfrom theparameterslist of the Operation Object withGETmethod. - Change the operation
methodtoPOSTor any other method that supports a request body.