Support for XML Data and XML Schema Added to Our RAML Parsers

Release DateMar 5, 2019
Change Type
Platforms Affected

    Both versions of RAML (0.8, 1.0) support XML examples and XML schema definitions. Previously, we supported only JSON examples and JSON schema definitions found in RAML input files. Now, however, we support parsing of XML examples and XML schema definitions as well.


    XML examples and XML schema type specifications are allowed at several levels in RAML e.g. request/response body definitions, global schema/type definitions, etc. While these were ignored previously by our tool, we now utilize them in case no JSON examples/schema definitions are found.


      displayName: Jobs
        description: Create a Job
            schema: |
              <xs:schema attributeFormDefault="unqualified"
                <xs:element name="api-request">
                      <xs:element type="xs:string" name="input"/>
            example: |
                <input>Test Input</input>

    For the above case, in order to extract information about the request body, our parsers will internally convert the XML schema to a JSON schema and the XML example to a JSON example.

    Note   Since information extracted from XML schema/XML examples is essentially mapped to a JSON structure, it may not support every XML feature.

    Related Links

    Have questions? Submit a request.