get-method-cannot-have-request-representation-element
Overview
This rule belongs to the wadl-validation
ruleset and states that:
If the <method> name
is set as GET
, the <request> element in the method must not contain the inner child <representation> element. This is because use of representation elements is confined to HTTP methods that accept an entity body in the request (e.g. PUT or POST). If this element is found for GET methods, all related information will be ignored automatically during import/transformations in APIMatic.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Child element <representation> found in the GET method request definition. |
Code | WADL_V200 |
Type | Validation |
Rule System | Semantic |
Broad Category | Methods |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | wadl api semantic validation get method request representation |
Suggested Fixes
- Remove <representation> element and all its data from the parent <request> element if the <request> is defined for a <method> with
GET
asname
.