cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

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.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

1 REPLY 1
Highlighted
Moderator

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.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors