Skip to content

Swagger-Models: Make definitions use a sorted Map instead of HashMap #2400

Description

@domdorn

io.swagger.models.Swagger#definitions is using a HashMap as its implementation. This leads to unstable results when serializing the spec to json.

I'd like to change the implementation to use a TreeMap<String, Model> instead. This makes sure, that the map is always sorted the same way.

I'm happy to provide a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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