Skip to content
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