cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the September Hub-bub

We are inviting you to join our exciting online event where you can learn a lot of useful information, share your knowledge and have fun. Each week, we will reward the best posters with free gift cards .

Just pick any topic you like in the SwaggerHub Community, or create your own to dive into the wonderful September Hub-bub.

Event duration: September 2-27. More information.

This Week Top Contributors:

We will decide the winners next Monday

How do you define XML elment with attribute and value like <Book id="1">Fundamentals of Music</Book>

Occasional Contributor

How do you define XML elment with attribute and value like <Book id="1">Fundamentals of Music</Book>

I'm trying to define an XML element that looks like the following and I don't know how to do it.

 

<Book id="1">Fundamentals of Music</Book>

 

Can someone show me how to define this in Swagger2.0?

 

1 REPLY 1
Moderator

Re: How do you define XML elment with attribute and value like <Book id="1">Fundamen

Hi bbuzzard,

 

Currently there is no way to represent this. Please see this thread for details:
https://community.smartbear.com/t5/SwaggerHub/Swagger-Definition-object-default-value/m-p/176972/hig...


Helen Kosova
SmartBear Technical Writer
________________________
Vote up helpful replies.
Accept this reply if you think it's the best solution to your question.

Join the September Hub-bub to show off, learn and win
New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win