Skip to content

[Feature] Deterministic order in the generated swagger output #445

@dominic-jones

Description

@dominic-jones

Is your feature request related to a problem? Please describe.
Understanding the exact change that OAS annotations have on the swagger output is not always easy. It is useful, as we did with Springfox, to generate the swagger and check-in the generated output. This allows developers reviewing PRs to understand the full implications of api / annotation changes.
However, unlike Springfox, the output of Springdoc is non-deterministic. The order of items on the generated output varies between different executions.

Describe the solution you'd like
A deterministic, predictable order of the generated operations, schemas, parameters.

Describe alternatives you've considered
I believe Springfox used parts of Jackson's model to order the output. e.g. the @JsonPropertyOrder annotation was respected. That's beyond my usecase. I don't need to control the output. I just want each run to order things the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions