Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ticket-3475 #3549

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.security.SecurityScheme;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.TreeMap;

/**
* Components
Expand Down Expand Up @@ -64,13 +64,13 @@ public void setSchemas(Map<String, Schema> schemas) {
}

public Components schemas(Map<String, Schema> schemas) {
this.schemas = schemas;
this.schemas = new TreeMap<>(schemas);
return this;
}

public Components addSchemas(String key, Schema schemasItem) {
if (this.schemas == null) {
this.schemas = new LinkedHashMap<>();
this.schemas = new TreeMap<>();
}
this.schemas.put(key, schemasItem);
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package io.swagger.v3.oas.models;

import java.util.LinkedHashMap;
import java.util.Objects;
import java.util.TreeMap;

/**
* Paths
*
* @see "https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#pathsObject"
*/

public class Paths extends LinkedHashMap<String, PathItem> {
public class Paths extends TreeMap<String, PathItem> {
public Paths() {
}

Expand Down