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.