Forum Discussion

DavidThielen's avatar
DavidThielen
Occasional Contributor
4 years ago
Solved

Why is an XML node not matshing my yaml (adds a s)

For the API at https://app.swaggerhub.com/apis/Windward-Studios/windward-rest_ful_api/2.0#free

If you look at the XML (not JSON) for POST v2/document, inside it it has

<Datasets>

    <Datasets>

        <Name>string</Name>

        <Query>string</Query>

    </Datasets>

</Datasets>

 

The inner <Datasets> should be <Dataset>. Why is it making it plural?

thanks - dave

  • Hi David,

     

    Add xml.name to the DataSet schema:

    xml:
      name: Dataset

    When using arrays in XML, singular/plural element names are not inferred and need to be explicitly defined using xml.name.

1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi David,

     

    Add xml.name to the DataSet schema:

    xml:
      name: Dataset

    When using arrays in XML, singular/plural element names are not inferred and need to be explicitly defined using xml.name.