rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.65k stars 277 forks source link

Feature Request: Ability to Sort Properties #1004

Open SingleShot opened 6 months ago

SingleShot commented 6 months ago

I like my properties being sorted alphabetically. I can author a spec with them ordered, but when reusing schemas to build more complex objects they are no longer sorted. For example, in this situation:

allOf:
  - $ref: '#/components/schemas/object1'
  - $ref: '#/components/schemas/object2'

The properties of object2 will be appended to the properties of object1. I'd like to be able to set something like: sort-properties = "true" and have the properties of both objects in this example collectively sorted together.

wparad commented 6 months ago

@SingleShot I can imagine the difficulty of getting that right while merging properties. If you don't get that resolved here, I'm wondering if that's something we could tackle over at the OpenAPI Explorer