27
27
import io .swagger .v3 .oas .models .security .SecurityScheme ;
28
28
29
29
import java .util .HashMap ;
30
+ import java .util .LinkedHashMap ;
30
31
import java .util .Map ;
31
32
import java .util .Objects ;
32
33
@@ -69,7 +70,7 @@ public Components schemas(Map<String, Schema> schemas) {
69
70
70
71
public Components addSchemas (String key , Schema schemasItem ) {
71
72
if (this .schemas == null ) {
72
- this .schemas = new HashMap < String , Schema >();
73
+ this .schemas = new LinkedHashMap < >();
73
74
}
74
75
this .schemas .put (key , schemasItem );
75
76
return this ;
@@ -96,7 +97,7 @@ public Components responses(Map<String, ApiResponse> responses) {
96
97
97
98
public Components addResponses (String key , ApiResponse responsesItem ) {
98
99
if (this .responses == null ) {
99
- this .responses = new HashMap < String , ApiResponse >();
100
+ this .responses = new LinkedHashMap < >();
100
101
}
101
102
this .responses .put (key , responsesItem );
102
103
return this ;
@@ -123,7 +124,7 @@ public Components parameters(Map<String, Parameter> parameters) {
123
124
124
125
public Components addParameters (String key , Parameter parametersItem ) {
125
126
if (this .parameters == null ) {
126
- this .parameters = new HashMap < String , Parameter >();
127
+ this .parameters = new LinkedHashMap < >();
127
128
}
128
129
this .parameters .put (key , parametersItem );
129
130
return this ;
@@ -150,7 +151,7 @@ public Components examples(Map<String, Example> examples) {
150
151
151
152
public Components addExamples (String key , Example examplesItem ) {
152
153
if (this .examples == null ) {
153
- this .examples = new HashMap < String , Example >();
154
+ this .examples = new LinkedHashMap < >();
154
155
}
155
156
this .examples .put (key , examplesItem );
156
157
return this ;
@@ -177,7 +178,7 @@ public Components requestBodies(Map<String, RequestBody> requestBodies) {
177
178
178
179
public Components addRequestBodies (String key , RequestBody requestBodiesItem ) {
179
180
if (this .requestBodies == null ) {
180
- this .requestBodies = new HashMap < String , RequestBody >();
181
+ this .requestBodies = new LinkedHashMap < >();
181
182
}
182
183
this .requestBodies .put (key , requestBodiesItem );
183
184
return this ;
@@ -204,7 +205,7 @@ public Components headers(Map<String, Header> headers) {
204
205
205
206
public Components addHeaders (String key , Header headersItem ) {
206
207
if (this .headers == null ) {
207
- this .headers = new HashMap < String , Header >();
208
+ this .headers = new LinkedHashMap < >();
208
209
}
209
210
this .headers .put (key , headersItem );
210
211
return this ;
@@ -231,7 +232,7 @@ public Components securitySchemes(Map<String, SecurityScheme> securitySchemes) {
231
232
232
233
public Components addSecuritySchemes (String key , SecurityScheme securitySchemesItem ) {
233
234
if (this .securitySchemes == null ) {
234
- this .securitySchemes = new HashMap < String , SecurityScheme >();
235
+ this .securitySchemes = new LinkedHashMap < >();
235
236
}
236
237
this .securitySchemes .put (key , securitySchemesItem );
237
238
return this ;
@@ -258,7 +259,7 @@ public Components links(Map<String, Link> links) {
258
259
259
260
public Components addLinks (String key , Link linksItem ) {
260
261
if (this .links == null ) {
261
- this .links = new HashMap < String , Link >();
262
+ this .links = new LinkedHashMap < >();
262
263
}
263
264
this .links .put (key , linksItem );
264
265
return this ;
@@ -285,7 +286,7 @@ public Components callbacks(Map<String, Callback> callbacks) {
285
286
286
287
public Components addCallbacks (String key , Callback callbacksItem ) {
287
288
if (this .callbacks == null ) {
288
- this .callbacks = new HashMap < String , Callback >();
289
+ this .callbacks = new LinkedHashMap < >();
289
290
}
290
291
this .callbacks .put (key , callbacksItem );
291
292
return this ;
@@ -326,7 +327,7 @@ public void addExtension(String name, Object value) {
326
327
return ;
327
328
}
328
329
if (this .extensions == null ) {
329
- this .extensions = new java .util .HashMap <>();
330
+ this .extensions = new java .util .LinkedHashMap <>();
330
331
}
331
332
this .extensions .put (name , value );
332
333
}
0 commit comments