Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageChild element <representation> found in the GET method request definition.
CodeWADL_V200
TypeValidation
Rule SystemSemantic
Broad CategoryMethods
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagswadl 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 as name.

For More Information