no-request-body-in-resource-get-method
Overview
This rule belongs to the api-blueprint-validation
ruleset and states that:
A resource in an API Blueprint/Elements file must not define an Attributes
or a Payload
section for the request when the actions use the GET HTTP method. This is because such methods do not expect a body and, therefore, all related information will be automatically ignored during import/transformations in APIMatic.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | An attributes or a request payload section is defined for a GET method. |
Code | APIBLUEPRINT_V100 |
Type | Validation |
Rule System | Semantic |
Broad Category | API Resources |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | api blueprint api elements api semantic validation get action http body request |
Suggested Fixes
- If an
Attributes
section is defined for the GET action, remove it. - If a
Request
section is defined, remove anyAttributes
orBody
orSchema
sections from it.