thim81 / openapi-format

Format an OpenAPI document by ordering, formatting and filtering fields.
MIT License
81 stars 14 forks source link

Sort paths by tags/operationId? #45

Open af-mikecrowe opened 2 years ago

af-mikecrowe commented 2 years ago

Is it possible to sort the paths deterministically? I'm thinking by tags then operationId?

thim81 commented 2 years ago

Hi @af-mikecrowe

Currently openapi-format sorts the elements within OpenAPI in a certain order, for example as defined in the default

af-mikecrowe commented 2 years ago

Right -- My question: Is it possible to expand to sort another level down? So, organize paths by Tag + OperationId, etc.

thim81 commented 2 years ago

@af-mikecrowe

I have to review the sorting logic, since currently it does 1 sort for all elements on 1 level.