oneOf always rendered in the bottom of an object
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
oneOf always rendered in the bottom of an object
Hi,
I have been fighting a little with this and I can simply not get the following to render in "correct order":
Whenever I declare something using the oneOf - it always renders in the bottom of the object (in the image above called object1). I would like the oneOf to be rendered above the attribute henrik.
Is this possible? And if not - why not?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be super nice if the SwaggerHub team (or anybody else) could answer if this is intended behavior or a bug...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @HenrikHL I have asked our team and will let you know as soon as I have an answer. Apologies and thank you for your patience.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HenrikHL Thank you for your question. SwaggerUI renders the schema models based on a predefined list of model types, and it is happenstance that "oneOf" is last to get parsed and rendered. There is no intentional ordering of "priorities" per se. So in this case, a schema model of a (default) "property" will get rendered first, followed by "allOf", then "oneOf".
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
