Define & Validate APIsValidation Rulesets

WADL Rulesets

The ruleset APIMatic uses to validate WADL documents.

APIMatic validates WADL v2006 and v2009 documents against the ruleset below. These include rules defined by the standard as well as additional checks APIMatic enforces for better output.

WADL Validation

Validation checks performed on a WADL (2009) file.

PropertyValue
Ruleset IDwadl-validation
Code prefixWADL_V
TypeValidation
Default severityError
Rule systemSemantic
Rules7

API Metadata

CodeRuleSeverityWhat it checks
WADL_V001required-application-doc-titleErrorA user-friendly title for the target API must be specified in the title attribute of the <doc> section nested directly within the root <application> element. If title information is not found, a default value will be assigned for it automatically during import/transformations in APIMatic.

Resources

CodeRuleSeverityWhat it checks
WADL_V100at-least-one-resourceWarningFor a better experience with import/transformation, it is recommended to include all crucial information in your WADL document. One such information is the resource definitions, which must be provided in the <resources> child element nested directly under the root <application> element. The <resources> element must contain at least one resource definition using the <resource> child element.

Methods

CodeRuleSeverityWhat it checks
WADL_V200get-method-cannot-have-request-representation-elementErrorIf 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.

Parameters

CodeRuleSeverityWhat it checks
WADL_V300required-param-name-attributeErrorWhen a parameter is defined using the <param> element, it must also specify a non-empty name for it using the name attribute.

Responses

CodeRuleSeverityWhat it checks
WADL_V400supported-response-status-attribute-valueWarningIf multiple responses are disabled via import settings provided in the APIMatic Metadata file, only response definitions belonging to status code ranges 200-208 and 400-599 will be imported. Those outside the supported range will be ignored automatically during import/transformations in APIMatic. Therefore, ensure that the value assigned to the status attribute of a <response> element falls in the same range.

Representations

CodeRuleSeverityWhat it checks
WADL_V500required-global-representation-id-attributeErrorWhen a <representation> element is defined directly as a child of the root <application> element, it must also specify a non-empty id for it using the id attribute. This id will help uniquely identify the representation in the document and help other components refer it using a URI reference.

Miscellaneous

CodeRuleSeverityWhat it checks
WADL_V600valid-wadl-syntaxBlockingThe provided WADL document must not contain any syntax/semantic issues and use only valid XML. Each property in the file must have a type or value as defined in the standard.

Learn more

On this page