Support for XML Added in API Transformer

Release DateJan 2, 2020
Change Type
Platforms Affected

    API Transformer now preserves XML examples and XML serialization attributes like XML node name, prefix, namespace, etc. which reduces loss of information when converting between popular formats that support XML like OAS, RAML, WSDL, WADL, etc.

    Format specific details about these new features are given below:

    OpenAPI

    The OpenAPI format offers a special XML object to help its users fine-tune representation of XML data. This helps specify node name, namespace, prefix and other arrays related metadata. More details about this can be found here. Both versions of OAS 2.0 and 3.0 support this XML object as well as corresponding XML examples.

    API Transformer now preserves information about this XML object as well as any XML examples in all conversions to and from OAS files at the following levels:

    1. Request Body
    2. Response Body
    3. Schema

    Note   In case both media types application/json and application/xml are supported by an API, currently only application/json will be considered.

    RAML

    Much like OpenAPI, RAML also offers a very similar XML object to better represent XML data allowing users to specify node name, namespace, prefix and other arrays related metadata. This is supported in 1.0 and not in 0.8. More details about this object can be found here. In addition to this, RAML also supports XML schema for defining types that use XML. While support for parsing XML schema from RAML has been available in API Transformer for a while, it now also supports XML examples as well as preserves information from the XML object that includes serialization details. Existing support for XML schema has been improved as well. More details about that are provided in the XML schema section below.

    The above information will now be preserved for all conversions to and from RAML files at the following levels:

    1. Request Body
    2. Response Body
    3. Schema/Type Declaration

    Note   In case both media types application/json and application/xml are supported by an API, currently only application/json will be considered.

    Postman

    Postman supports XML examples in request/response body which are now supported in API Transformer for all conversions to and from Postman files. This applies to all supported versions of Postman: 1.0, 2.0 and 2.1.

    Insomnia

    Insomnia supports XML examples in the request body which are now supported in API Transformer for all conversions to and from Insomnia files. This applies to all supported versions of Insomnia (3 and above).

    HAR

    HAR supports XML examples in request/response body which are now supported in API Transformer for all conversion from HAR files. This applies to the supported version of HAR 1.2.

    WSDL/WADL

    Both formats support XML schema for types specification in which improvements have been made that are discussed in the XML schema section below.

    XML Schema

    Import/export of XML schema is supported in API Transformer for conversion involving formats RAML, WSDL and WADL. Improvements have been made to the existing support for XML schema that include:

    1. Information about node name, prefix and namespaces will now be preserved.
    2. Element and attribute form defaults (qualified/unqualified) will now be taken care of when importing.
    3. During export, if multiple namespaces are involved, multiple XML schema objects will be exported.

    XML Examples

    When importing/exporting XML examples, information about node name, prefix, namespace and attributes will now be preserved.

    Related Links


    Have questions? Submit a request.