Skip to content

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

@domdorn

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.

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