Skip to content

Commit 38d8d0b

Browse files
authored
Merge pull request #9761 from swagger-api/fix-resteasy-gradle-date
refs swagger-api/swagger-codegen-generators#493 - update resteasy samples
2 parents fe22a9e + 45b3f37 commit 38d8d0b

File tree

9 files changed

+15
-16
lines changed

9 files changed

+15
-16
lines changed

samples/server/petstore/jaxrs-resteasy/default/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
compile 'io.swagger.core.v3:swagger-annotations:2.0.0'
1919
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
2020
providedCompile 'javax.validation:validation-api:1.1.0.Final'
21-
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.4.1'
21+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.10'
2222
compile 'joda-time:joda-time:2.7'
2323
//TODO: swaggerFeature
2424
compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0'

samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long order
7878
}
7979
@POST
8080
@Path("/order")
81-
@Consumes({ "*/*" })
81+
@Consumes({ "application/json" })
8282
@Produces({ "application/xml", "application/json" })
8383
@Operation(summary = "Place an order for a pet", description = "", tags={ "store" })
8484
@ApiResponses(value = {

samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class UserApi {
3636

3737
@POST
3838

39-
@Consumes({ "*/*" })
39+
@Consumes({ "application/json" })
4040

4141
@Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" })
4242
@ApiResponses(value = {
@@ -47,7 +47,7 @@ public Response createUser(@Parameter(description = "Created user object" ,requi
4747
}
4848
@POST
4949
@Path("/createWithArray")
50-
@Consumes({ "*/*" })
50+
@Consumes({ "application/json" })
5151

5252
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
5353
@ApiResponses(value = {
@@ -58,7 +58,7 @@ public Response createUsersWithArrayInput(@Parameter(description = "List of user
5858
}
5959
@POST
6060
@Path("/createWithList")
61-
@Consumes({ "*/*" })
61+
@Consumes({ "application/json" })
6262

6363
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
6464
@ApiResponses(value = {

samples/server/petstore/jaxrs-resteasy/java8/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ dependencies {
1818
compile 'io.swagger.core.v3:swagger-annotations:2.0.0'
1919
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
2020
providedCompile 'javax.validation:validation-api:1.1.0.Final'
21-
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.4.1'
22-
compile 'joda-time:joda-time:2.7'
21+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10'
2322
//TODO: swaggerFeature
2423
compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0'
2524

samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long order
7878
}
7979
@POST
8080
@Path("/order")
81-
@Consumes({ "*/*" })
81+
@Consumes({ "application/json" })
8282
@Produces({ "application/xml", "application/json" })
8383
@Operation(summary = "Place an order for a pet", description = "", tags={ "store" })
8484
@ApiResponses(value = {

samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/io/swagger/api/UserApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class UserApi {
3636

3737
@POST
3838

39-
@Consumes({ "*/*" })
39+
@Consumes({ "application/json" })
4040

4141
@Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" })
4242
@ApiResponses(value = {
@@ -47,7 +47,7 @@ public Response createUser(@Parameter(description = "Created user object" ,requi
4747
}
4848
@POST
4949
@Path("/createWithArray")
50-
@Consumes({ "*/*" })
50+
@Consumes({ "application/json" })
5151

5252
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
5353
@ApiResponses(value = {
@@ -58,7 +58,7 @@ public Response createUsersWithArrayInput(@Parameter(description = "List of user
5858
}
5959
@POST
6060
@Path("/createWithList")
61-
@Consumes({ "*/*" })
61+
@Consumes({ "application/json" })
6262

6363
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
6464
@ApiResponses(value = {

samples/server/petstore/jaxrs-resteasy/joda/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
compile 'io.swagger.core.v3:swagger-annotations:2.0.0'
1919
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
2020
providedCompile 'javax.validation:validation-api:1.1.0.Final'
21-
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.4.1'
21+
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.10'
2222
compile 'joda-time:joda-time:2.7'
2323
//TODO: swaggerFeature
2424
compile 'io.swagger.core.v3:swagger-jaxrs2:2.0.0'

samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Response getOrderById( @Min(1L) @Max(5L) @PathParam("orderId") Long order
7878
}
7979
@POST
8080
@Path("/order")
81-
@Consumes({ "*/*" })
81+
@Consumes({ "application/json" })
8282
@Produces({ "application/xml", "application/json" })
8383
@Operation(summary = "Place an order for a pet", description = "", tags={ "store" })
8484
@ApiResponses(value = {

samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class UserApi {
3636

3737
@POST
3838

39-
@Consumes({ "*/*" })
39+
@Consumes({ "application/json" })
4040

4141
@Operation(summary = "Create user", description = "This can only be done by the logged in user.", tags={ "user" })
4242
@ApiResponses(value = {
@@ -47,7 +47,7 @@ public Response createUser(@Parameter(description = "Created user object" ,requi
4747
}
4848
@POST
4949
@Path("/createWithArray")
50-
@Consumes({ "*/*" })
50+
@Consumes({ "application/json" })
5151

5252
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
5353
@ApiResponses(value = {
@@ -58,7 +58,7 @@ public Response createUsersWithArrayInput(@Parameter(description = "List of user
5858
}
5959
@POST
6060
@Path("/createWithList")
61-
@Consumes({ "*/*" })
61+
@Consumes({ "application/json" })
6262

6363
@Operation(summary = "Creates list of users with given input array", description = "", tags={ "user" })
6464
@ApiResponses(value = {

0 commit comments

Comments
 (0)