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

Updated swagger-core to version 1.6.1 to support 'parseValue' in 'extensions' #877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@

<!-- Dependency versions -->
<maven.version>2.2.1</maven.version>
<swagger.version>1.5.21</swagger.version>
<jackson.version>2.8.9</jackson.version>
<swagger.version>1.6.1</swagger.version>
<jackson.version>2.10.5</jackson.version>
<log4j.version>1.2.16</log4j.version>
<handlebars.version>1.3.2</handlebars.version>
<commons-io.version>2.0.1</commons-io.version>
Expand All @@ -72,7 +72,7 @@
<commons-lang3.version>3.9</commons-lang3.version>
<version.jersey-server>1.13</version.jersey-server>
<version.javax.ws.rs-api>2.0.1</version.javax.ws.rs-api>
<version.maven-plugin-annotations>3.3</version.maven-plugin-annotations>
<version.maven-plugin-annotations>3.6.2</version.maven-plugin-annotations>
<!-- Test dependency versions -->
<maven-testing-harness.version>1.3</maven-testing-harness.version>
<testng.version>6.8.8</testng.version>
Expand All @@ -86,14 +86,14 @@
<version.maven-release-plugin>2.5.3</version.maven-release-plugin>
<version.plexus-component-metadata>1.5.5</version.plexus-component-metadata>
<version.maven-compiler-plugin>2.3.2</version.maven-compiler-plugin>
<version.maven-plugin-plugin>3.3</version.maven-plugin-plugin>
<version.maven-plugin-plugin>3.6.2</version.maven-plugin-plugin>
<version.animal-sniffer-plugin>1.14</version.animal-sniffer-plugin>
<version.maven-source-plugin>2.1.2</version.maven-source-plugin>
<version.maven-javadoc-plugin>2.7</version.maven-javadoc-plugin>
<version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
<version.plexus-javadoc>1.0</version.plexus-javadoc>
<version.slf4j-nop>1.7.25</version.slf4j-nop>
<kotlin.version>1.2.61</kotlin.version>
<kotlin.version>1.6.10</kotlin.version>
</properties>

<dependencies>
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/wordnik/sample/model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/expectedOutput/swagger-externalDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/expectedOutput/swagger-spring.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expectedOutput/swagger-spring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion src/test/resources/expectedOutput/swagger-swaggerreader.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expectedOutput/swagger-swaggerreader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expectedOutput/swagger-with-converter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion src/test/resources/expectedOutput/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expectedOutput/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" : {
Expand Down