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
paramType
set asbody
orform
from theparameters
list of the Operation Object withGET
method. - Change the operation
method
toPOST
or any other method that supports a request body.