Forum Discussion

HenrikHL's avatar
Frequent Contributor
2 years ago

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...
  • tlai's avatar
    2 years ago

    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".