You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For documentation readability it would be very convenient if the required properties of schema are the same of the order of properties in the schema itself. Unfortunately this is not the case and the required properties are always ordered alphabetically.
public void setRequired(List<String> required) {
List<String> list = new ArrayList<>();
if (required != null) {
for (String req : required) {
if (this.properties == null || this.properties.containsKey(req)) {
list.add(req);
}
}
}
Collections.sort(list); // <==================== HERE!
if (list.isEmpty()) {
list = null;
}
this.required = list;
}
What is the rationale behind this?
The text was updated successfully, but these errors were encountered:
https://github.com/swagger-api/swagger-core/blame/f728c95fd8d6d9153cdcc18043a15bd6ae0612e3/modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/Schema.java#L1211
For documentation readability it would be very convenient if the
required
properties of schema are the same of the order of properties in the schema itself. Unfortunately this is not the case and therequired
properties are always ordered alphabetically.What is the rationale behind this?
The text was updated successfully, but these errors were encountered: