Skip to content

Always generate yaml/json with the same element order #857

@kemalizing

Description

@kemalizing

Is your feature request related to a problem? Please describe.
We are using springdoc to generate openapi yaml files from kotlin code (for this feature language doesn't matter, it is the same for java), and also we store the output in our git repo. Whenever we change something in underlying kotlin classes, we re-generate the yaml and create a PR. because there is no guarantee in generated yaml element ordering, even if we change something very small, we have a huge PR for the yaml part.

Describe the solution you'd like
Generate the yaml/json in a way that the ordering is consistent between every generation. This can be achieved by sorting paths, components etc by name while generating the spec.

Describe alternatives you've considered

Additional context

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