From c4ecf7cad73a6725715b919a45119d2bd8363841 Mon Sep 17 00:00:00 2001 From: ankrim Date: Fri, 7 Jan 2022 10:25:33 -0800 Subject: [PATCH] Updated swagger-core to version 1.6.1 to support 'parseValue' in 'extensions' --- pom.xml | 10 +++++----- src/test/java/com/wordnik/sample/model/User.java | 3 ++- .../expectedOutput/swagger-enhanced-operation-id.json | 3 ++- .../resources/expectedOutput/swagger-externalDocs.json | 3 ++- .../swagger-spring-enhanced-operation-id.json | 3 ++- src/test/resources/expectedOutput/swagger-spring.json | 3 ++- src/test/resources/expectedOutput/swagger-spring.yaml | 4 ++++ .../expectedOutput/swagger-swaggerreader.json | 3 ++- .../expectedOutput/swagger-swaggerreader.yaml | 4 ++++ .../expectedOutput/swagger-with-converter.json | 3 ++- .../expectedOutput/swagger-with-converter.yaml | 4 ++++ src/test/resources/expectedOutput/swagger.json | 3 ++- src/test/resources/expectedOutput/swagger.yaml | 4 ++++ .../jsonExampleValues/expected/swagger-spring.json | 3 ++- .../options/jsonExampleValues/expected/swagger.json | 3 ++- 15 files changed, 41 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 5672e7b40..2d3ef7dca 100644 --- a/pom.xml +++ b/pom.xml @@ -62,8 +62,8 @@ 2.2.1 - 1.5.21 - 2.8.9 + 1.6.1 + 2.10.5 1.2.16 1.3.2 2.0.1 @@ -72,7 +72,7 @@ 3.9 1.13 2.0.1 - 3.3 + 3.6.2 1.3 6.8.8 @@ -86,14 +86,14 @@ 2.5.3 1.5.5 2.3.2 - 3.3 + 3.6.2 1.14 2.1.2 2.7 1.6 1.0 1.7.25 - 1.2.61 + 1.6.10 diff --git a/src/test/java/com/wordnik/sample/model/User.java b/src/test/java/com/wordnik/sample/model/User.java index 936f04c80..b3db78997 100644 --- a/src/test/java/com/wordnik/sample/model/User.java +++ b/src/test/java/com/wordnik/sample/model/User.java @@ -110,7 +110,8 @@ public void setPhone(String phone) { } @XmlElement(name = "userStatus") - @ApiModelProperty(value = "User Status", allowableValues = "1-registered,2-active,3-closed", example = "2") + @ApiModelProperty(value = "User Status", allowableValues = "1-registered,2-active,3-closed", example = "2", + extensions = @Extension(properties = {@ExtensionProperty(name = "nested", parseValue = true, value = "{\"field1\": 1, \"field2\": [2,3], \"field3\": \"value3\" }")})) public int getUserStatus() { return userStatus; } diff --git a/src/test/resources/expectedOutput/swagger-enhanced-operation-id.json b/src/test/resources/expectedOutput/swagger-enhanced-operation-id.json index 6664092e6..626380359 100644 --- a/src/test/resources/expectedOutput/swagger-enhanced-operation-id.json +++ b/src/test/resources/expectedOutput/swagger-enhanced-operation-id.json @@ -1593,7 +1593,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : { diff --git a/src/test/resources/expectedOutput/swagger-externalDocs.json b/src/test/resources/expectedOutput/swagger-externalDocs.json index 2fab4c42a..fb8f58ba5 100644 --- a/src/test/resources/expectedOutput/swagger-externalDocs.json +++ b/src/test/resources/expectedOutput/swagger-externalDocs.json @@ -1953,7 +1953,8 @@ "type": "integer", "format": "int32", "example": 2, - "description": "User Status" + "description": "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml": { diff --git a/src/test/resources/expectedOutput/swagger-spring-enhanced-operation-id.json b/src/test/resources/expectedOutput/swagger-spring-enhanced-operation-id.json index 0939fb388..5e66eccb2 100644 --- a/src/test/resources/expectedOutput/swagger-spring-enhanced-operation-id.json +++ b/src/test/resources/expectedOutput/swagger-spring-enhanced-operation-id.json @@ -1641,7 +1641,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : { diff --git a/src/test/resources/expectedOutput/swagger-spring.json b/src/test/resources/expectedOutput/swagger-spring.json index 7ae3ce378..791bfe8a9 100644 --- a/src/test/resources/expectedOutput/swagger-spring.json +++ b/src/test/resources/expectedOutput/swagger-spring.json @@ -1641,7 +1641,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : { diff --git a/src/test/resources/expectedOutput/swagger-spring.yaml b/src/test/resources/expectedOutput/swagger-spring.yaml index 70b594b1a..e19d0f7dc 100644 --- a/src/test/resources/expectedOutput/swagger-spring.yaml +++ b/src/test/resources/expectedOutput/swagger-spring.yaml @@ -1410,6 +1410,10 @@ definitions: format: "int32" example: 2 description: "User Status" + x-nested: + field1: 1 + field2: [ 2,3 ] + field3: "value3" xml: name: "User" namespace: "http://com.wordnik/sample/model" diff --git a/src/test/resources/expectedOutput/swagger-swaggerreader.json b/src/test/resources/expectedOutput/swagger-swaggerreader.json index 146cb79e0..4aab403e7 100644 --- a/src/test/resources/expectedOutput/swagger-swaggerreader.json +++ b/src/test/resources/expectedOutput/swagger-swaggerreader.json @@ -1445,7 +1445,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : { diff --git a/src/test/resources/expectedOutput/swagger-swaggerreader.yaml b/src/test/resources/expectedOutput/swagger-swaggerreader.yaml index 2f3cb92c3..66d70296f 100644 --- a/src/test/resources/expectedOutput/swagger-swaggerreader.yaml +++ b/src/test/resources/expectedOutput/swagger-swaggerreader.yaml @@ -1237,6 +1237,10 @@ definitions: format: "int32" example: 2 description: "User Status" + x-nested: + field1: 1 + field2: [ 2,3 ] + field3: "value3" xml: name: "User" namespace: "http://com.wordnik/sample/model" diff --git a/src/test/resources/expectedOutput/swagger-with-converter.json b/src/test/resources/expectedOutput/swagger-with-converter.json index cdac15a72..6c29b8689 100644 --- a/src/test/resources/expectedOutput/swagger-with-converter.json +++ b/src/test/resources/expectedOutput/swagger-with-converter.json @@ -1948,7 +1948,8 @@ "type": "integer", "format": "int32", "example": 2, - "description": "User Status" + "description": "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml": { diff --git a/src/test/resources/expectedOutput/swagger-with-converter.yaml b/src/test/resources/expectedOutput/swagger-with-converter.yaml index fc7c8727d..62cf58d05 100644 --- a/src/test/resources/expectedOutput/swagger-with-converter.yaml +++ b/src/test/resources/expectedOutput/swagger-with-converter.yaml @@ -1382,6 +1382,10 @@ definitions: format: "int32" example: 2 description: "User Status" + x-nested: + field1: 1 + field2: [ 2,3 ] + field3: "value3" xml: name: "User" namespace: "http://com.wordnik/sample/model" diff --git a/src/test/resources/expectedOutput/swagger.json b/src/test/resources/expectedOutput/swagger.json index 3e9675b70..891c37a77 100644 --- a/src/test/resources/expectedOutput/swagger.json +++ b/src/test/resources/expectedOutput/swagger.json @@ -1953,7 +1953,8 @@ "type": "integer", "format": "int32", "example": 2, - "description": "User Status" + "description": "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml": { diff --git a/src/test/resources/expectedOutput/swagger.yaml b/src/test/resources/expectedOutput/swagger.yaml index b45b2898e..8251b8141 100644 --- a/src/test/resources/expectedOutput/swagger.yaml +++ b/src/test/resources/expectedOutput/swagger.yaml @@ -1382,6 +1382,10 @@ definitions: format: "int32" example: 2 description: "User Status" + x-nested: + field1: 1 + field2: [ 2,3 ] + field3: "value3" xml: name: "User" namespace: "http://com.wordnik/sample/model" diff --git a/src/test/resources/options/jsonExampleValues/expected/swagger-spring.json b/src/test/resources/options/jsonExampleValues/expected/swagger-spring.json index b5a8cebc3..4e0d819f4 100644 --- a/src/test/resources/options/jsonExampleValues/expected/swagger-spring.json +++ b/src/test/resources/options/jsonExampleValues/expected/swagger-spring.json @@ -1071,7 +1071,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : { diff --git a/src/test/resources/options/jsonExampleValues/expected/swagger.json b/src/test/resources/options/jsonExampleValues/expected/swagger.json index 9c6eef0e5..8bb501b0a 100644 --- a/src/test/resources/options/jsonExampleValues/expected/swagger.json +++ b/src/test/resources/options/jsonExampleValues/expected/swagger.json @@ -960,7 +960,8 @@ "type" : "integer", "format" : "int32", "example" : 2, - "description" : "User Status" + "description" : "User Status", + "x-nested": {"field1": 1, "field2": [2,3], "field3": "value3" } } }, "xml" : {