Skip to content

Commit 1e38c28

Browse files
authored
Merge pull request #3355 from swagger-api/jackson-bump
bump jackson to 2.10.1 - fixes CVE
2 parents 035418f + 32b9cd8 commit 1e38c28

28 files changed

+142
-142
lines changed

modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/JsonDeserializationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public void testDeserializeRefCallback() throws Exception {
281281
" summary: Simple get operation\n" +
282282
" operationId: getWithNoParameters\n" +
283283
" responses:\n" +
284-
" 200:\n" +
284+
" \"200\":\n" +
285285
" description: voila!\n" +
286286
" callbacks:\n" +
287287
" testCallback1:\n" +

modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/ArrayPropertyDeserializerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class ArrayPropertyDeserializerTest {
1616
private static final String yaml =
1717
" operationId: something\n" +
1818
" responses:\n" +
19-
" 200:\n" +
19+
" \"200\":\n" +
2020
" content:\n" +
2121
" '*/*':\n" +
2222
" examples:\n" +

modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/properties/MapPropertyDeserializerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public void testMapDeserializationVendorExtensions() throws Exception {
205205
public void testIssue1261InlineSchemaExample() throws Exception {
206206
Operation operation = Yaml.mapper().readValue(
207207
" responses:\n" +
208-
" 200:\n" +
208+
" \"200\":\n" +
209209
" content:\n" +
210210
" '*/*':\n" +
211211
" description: OK\n" +

modules/swagger-core/src/test/resources/specFiles/petstore-3.0.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ paths:
2222
type: integer
2323
format: int32
2424
responses:
25-
200:
25+
"200":
2626
description: An paged array of pets
2727
headers:
2828
x-next:
@@ -45,7 +45,7 @@ paths:
4545
tags:
4646
- pets
4747
responses:
48-
201:
48+
"201":
4949
description: Null response
5050
default:
5151
description: unexpected error
@@ -67,7 +67,7 @@ paths:
6767
schema:
6868
type: string
6969
responses:
70-
200:
70+
"200":
7171
description: Expected response to a valid request
7272
content:
7373
application/json:

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/ContainerTypeSchemaTicket2636Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public void testContainerTypeSchemaTicket2636() throws Exception {
3131
" $ref: '#/components/schemas/MyModel'\n" +
3232
" required: true\n" +
3333
" responses:\n" +
34-
" 200:\n" +
34+
" \"200\":\n" +
3535
" description: voila!\n" +
3636
"components:\n" +
3737
" schemas:\n" +

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/EnumTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ public void testEnum() throws IOException {
3838
" - A\n" +
3939
" - B\n" +
4040
" responses:\n" +
41-
" 200:\n" +
41+
" \"200\":\n" +
4242
" content:\n" +
4343
" application/json:\n" +
4444
" schema:\n" +
4545
" type: array\n" +
4646
" items:\n" +
4747
" $ref: '#/components/schemas/TaskDTO'\n" +
48-
" 404:\n" +
48+
" \"404\":\n" +
4949
" description: User not found\n" +
5050
"components:\n" +
5151
" schemas:\n" +

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/ReaderTest.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,15 @@ public void testMoreResponses() {
350350
" object\n" +
351351
" operationId: getWithPayloadResponse\n" +
352352
" responses:\n" +
353-
" 200:\n" +
353+
" \"200\":\n" +
354354
" description: voila!\n" +
355355
" content:\n" +
356356
" application/json:\n" +
357357
" schema:\n" +
358358
" $ref: '#/components/schemas/SampleResponseSchema'\n" +
359-
" 404:\n" +
359+
" \"404\":\n" +
360360
" description: not found!\n" +
361-
" 400:\n" +
361+
" \"400\":\n" +
362362
" description: boo\n" +
363363
" content:\n" +
364364
" '*/*':\n" +
@@ -389,7 +389,7 @@ public void testGetResponsesWithComposition() {
389389
" object\n" +
390390
" operationId: getWithPayloadResponse\n" +
391391
" responses:\n" +
392-
" 200:\n" +
392+
" \"200\":\n" +
393393
" description: voila!\n" +
394394
" content:\n" +
395395
" application/json:\n" +
@@ -416,7 +416,7 @@ public void testGetResponsesWithComposition() {
416416
" format: int32\n" +
417417
" example: 1\n" +
418418
" responses:\n" +
419-
" 200:\n" +
419+
" \"200\":\n" +
420420
" description: bean answer\n" +
421421
" content:\n" +
422422
" application/json:\n" +
@@ -438,7 +438,7 @@ public void testGetResponsesWithComposition() {
438438
" format: int32\n" +
439439
" example: 1\n" +
440440
" responses:\n" +
441-
" 200:\n" +
441+
" \"200\":\n" +
442442
" description: bean answer\n" +
443443
" content:\n" +
444444
" application/json:\n" +
@@ -460,7 +460,7 @@ public void testGetResponsesWithComposition() {
460460
" format: int32\n" +
461461
" example: 1\n" +
462462
" responses:\n" +
463-
" 200:\n" +
463+
" \"200\":\n" +
464464
" description: bean answer\n" +
465465
" content:\n" +
466466
" application/json:\n" +
@@ -1161,7 +1161,7 @@ public void testTicket2793() {
11611161
" get:\n" +
11621162
" operationId: getDistances\n" +
11631163
" responses:\n" +
1164-
" 200:\n" +
1164+
" \"200\":\n" +
11651165
" content:\n" +
11661166
" application/json:\n" +
11671167
" schema:\n" +
@@ -1214,7 +1214,7 @@ public void testResponseWithRef() {
12141214
" object\n" +
12151215
" operationId: getWithPayloadResponse\n" +
12161216
" responses:\n" +
1217-
" 200:\n" +
1217+
" \"200\":\n" +
12181218
" description: voila!\n" +
12191219
" content:\n" +
12201220
" application/json:\n" +
@@ -1226,7 +1226,7 @@ public void testResponseWithRef() {
12261226
" '*/*':\n" +
12271227
" schema:\n" +
12281228
" $ref: '#/components/schemas/GenericError'\n" +
1229-
" 401:\n" +
1229+
" \"401\":\n" +
12301230
" $ref: '#/components/responses/invalidJWT'\n" +
12311231
" deprecated: true\n" +
12321232
"components:\n" +
@@ -1269,7 +1269,7 @@ public void testResponseWithFilter() {
12691269
" operationId: getWithPayloadResponse\n" +
12701270
" parameters: []\n" +
12711271
" responses:\n" +
1272-
" 200:\n" +
1272+
" \"200\":\n" +
12731273
" description: voila!\n" +
12741274
" content:\n" +
12751275
" application/json:\n" +
@@ -1281,7 +1281,7 @@ public void testResponseWithFilter() {
12811281
" '*/*':\n" +
12821282
" schema:\n" +
12831283
" $ref: '#/components/schemas/GenericError'\n" +
1284-
" 401:\n" +
1284+
" \"401\":\n" +
12851285
" $ref: '#/components/responses/invalidJWT'\n" +
12861286
" deprecated: true\n" +
12871287
"components:\n" +
@@ -1750,7 +1750,7 @@ public void testHeaderWithRef() {
17501750
" description: Defines a simple get operation with no inputs and a complex output\n" +
17511751
" operationId: getWithPayloadResponse\n" +
17521752
" responses:\n" +
1753-
" 200:\n" +
1753+
" \"200\":\n" +
17541754
" description: voila!\n" +
17551755
" headers:\n" +
17561756
" Rate-Limit-Limit:\n" +
@@ -1879,7 +1879,7 @@ public void testCallbackWithRef() {
18791879
" summary: Simple get operation\n" +
18801880
" operationId: getWithNoParameters\n" +
18811881
" responses:\n" +
1882-
" 200:\n" +
1882+
" \"200\":\n" +
18831883
" description: voila!\n" +
18841884
" callbacks:\n" +
18851885
" testCallback1:\n" +
@@ -1903,16 +1903,16 @@ public void testTicket3015() {
19031903
" get:\n" +
19041904
" operationId: schemaImpl\n" +
19051905
" responses:\n" +
1906-
" 200:\n" +
1906+
" \"200\":\n" +
19071907
" description: OK\n" +
19081908
" content:\n" +
19091909
" '*/*':\n" +
19101910
" schema:\n" +
19111911
" type: string\n" +
19121912
" format: uri\n" +
1913-
" 400:\n" +
1913+
" \"400\":\n" +
19141914
" description: Bad Request\n" +
1915-
" 500:\n" +
1915+
" \"500\":\n" +
19161916
" description: Internal Server Error\n";
19171917
SerializationMatchers.assertEqualsToYaml(openAPI, yaml);
19181918
PrimitiveType.customExcludedClasses().add(URI.class.getName());
@@ -1923,7 +1923,7 @@ public void testTicket3015() {
19231923
" get:\n" +
19241924
" operationId: schemaImpl_1\n" +
19251925
" responses:\n" +
1926-
" 200:\n" +
1926+
" \"200\":\n" +
19271927
" description: OK\n" +
19281928
" content:\n" +
19291929
" '*/*':\n" +
@@ -1965,9 +1965,9 @@ public void testTicket3015() {
19651965
" type: boolean\n" +
19661966
" opaque:\n" +
19671967
" type: boolean\n" +
1968-
" 400:\n" +
1968+
" \"400\":\n" +
19691969
" description: Bad Request\n" +
1970-
" 500:\n" +
1970+
" \"500\":\n" +
19711971
" description: Internal Server Error\n";
19721972
SerializationMatchers.assertEqualsToYaml(openAPI, yaml);
19731973
PrimitiveType.customExcludedClasses().remove(URI.class.getName());

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/callbacks/CallbackTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public void testSimpleCallback() {
7070
" format: uuid\n" +
7171
" readOnly: true\n" +
7272
" responses:\n" +
73-
" 200:\n" +
73+
" \"200\":\n" +
7474
" description: Return this code if the callback was received and processed\n" +
7575
" successfully\n" +
76-
" 205:\n" +
76+
" \"205\":\n" +
7777
" description: Return this code to unsubscribe from future data updates\n" +
7878
" default:\n" +
7979
" description: All other response codes will disable this callback\n" +
@@ -159,7 +159,7 @@ public void simpleCallbacksWithOneCallbackTest() {
159159
" summary: Simple get operation\n" +
160160
" operationId: getWithNoParameters\n" +
161161
" responses:\n" +
162-
" 200:\n" +
162+
" \"200\":\n" +
163163
" description: voila!\n" +
164164
" callbacks:\n" +
165165
" testCallback1:\n" +
@@ -197,7 +197,7 @@ public void simpleCallbacksWithOneCallbackWithOperationTest() {
197197
" summary: Simple get operation\n" +
198198
" operationId: getWithNoParameters\n" +
199199
" responses:\n" +
200-
" 200:\n" +
200+
" \"200\":\n" +
201201
" description: voila!\n" +
202202
" callbacks:\n" +
203203
" testCallback1:\n" +
@@ -206,7 +206,7 @@ public void simpleCallbacksWithOneCallbackWithOperationTest() {
206206
" summary: get all the reviews\n" +
207207
" operationId: getAllReviews\n" +
208208
" responses:\n" +
209-
" 200:\n" +
209+
" \"200\":\n" +
210210
" description: successful operation\n" +
211211
" content:\n" +
212212
" application/json:\n" +
@@ -260,7 +260,7 @@ public void simpleCallbacksWithMultipleCallbackWithOperationTest() {
260260
" summary: Simple get operation\n" +
261261
" operationId: getWithNoParameters\n" +
262262
" responses:\n" +
263-
" 200:\n" +
263+
" \"200\":\n" +
264264
" description: voila!\n" +
265265
" callbacks:\n" +
266266
" testCallback1:\n" +
@@ -269,7 +269,7 @@ public void simpleCallbacksWithMultipleCallbackWithOperationTest() {
269269
" summary: get all the reviews\n" +
270270
" operationId: getAllReviews\n" +
271271
" responses:\n" +
272-
" 200:\n" +
272+
" \"200\":\n" +
273273
" description: successful operation\n" +
274274
" content:\n" +
275275
" application/json:\n" +
@@ -326,7 +326,7 @@ public void callbackCallbacksAnnotationTest() {
326326
" summary: Simple get operation\n" +
327327
" operationId: getWithNoParameters\n" +
328328
" responses:\n" +
329-
" 200:\n" +
329+
" \"200\":\n" +
330330
" description: voila!\n" +
331331
" callbacks:\n" +
332332
" testCallback:\n" +
@@ -337,7 +337,7 @@ public void callbackCallbacksAnnotationTest() {
337337
" summary: get all the reviews\n" +
338338
" operationId: getAllReviews\n" +
339339
" responses:\n" +
340-
" 200:\n" +
340+
" \"200\":\n" +
341341
" description: successful operation\n" +
342342
" content:\n" +
343343
" application/json:\n" +
@@ -361,7 +361,7 @@ public void repeatableCallbackCallbacksAnnotationTest() {
361361
" summary: Simple get operation\n" +
362362
" operationId: getWithNoParameters\n" +
363363
" responses:\n" +
364-
" 200:\n" +
364+
" \"200\":\n" +
365365
" description: voila!\n" +
366366
" callbacks:\n" +
367367
" testCallback:\n" +
@@ -372,7 +372,7 @@ public void repeatableCallbackCallbacksAnnotationTest() {
372372
" summary: get all the reviews\n" +
373373
" operationId: getAllReviews\n" +
374374
" responses:\n" +
375-
" 200:\n" +
375+
" \"200\":\n" +
376376
" description: successful operation\n" +
377377
" content:\n" +
378378
" application/json:\n" +

modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/annotations/encoding/EncodingTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void testSimpleGetOperationWithEncodingInApiResponse() {
4242
" description: Defines a simple get operation with no inputs and a complex\n" +
4343
" operationId: simpleGet\n" +
4444
" responses:\n" +
45-
" 200:\n" +
45+
" \"200\":\n" +
4646
" description: voila!\n" +
4747
" content:\n" +
4848
" application/json:\n" +
@@ -112,7 +112,7 @@ public void testGetOperationWithEncodingInParameter() {
112112
" style: form\n" +
113113
" allowReserved: true\n" +
114114
" responses:\n" +
115-
" 200:\n" +
115+
" \"200\":\n" +
116116
" description: voila!";
117117

118118
String extractedYAML = openApiYAML.substring(start, end);
@@ -188,7 +188,7 @@ public void testGetOperationWithEncodingArrayInParameter() {
188188
" style: form\n" +
189189
" allowReserved: true\n" +
190190
" responses:\n" +
191-
" 200:\n" +
191+
" \"200\":\n" +
192192
" description: voila!";
193193

194194
String extractedYAML = openApiYAML.substring(start, end);
@@ -265,7 +265,7 @@ public void testGetOperationWithEncodingInRequestBody() {
265265
" explode: true\n" +
266266
" required: true\n" +
267267
" responses:\n" +
268-
" 200:\n" +
268+
" \"200\":\n" +
269269
" description: voila!";
270270
String extractedYAML = openApiYAML.substring(start, end);
271271

@@ -312,7 +312,7 @@ public void testSimpleGetOperation() {
312312
" description: Defines a simple get operation with no inputs and a complex\n" +
313313
" operationId: getWithNoParameters\n" +
314314
" responses:\n" +
315-
" 200:\n" +
315+
" \"200\":\n" +
316316
" description: voila!";
317317
String extractedYAML = openApiYAML.substring(start, end);
318318

0 commit comments

Comments
 (0)