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

[java] jersey 2.35 #11661

Merged
merged 1 commit into from
Feb 20, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class {{classname}} {
}

{{#operation}}
@{{httpMethod}}
@javax.ws.rs.{{httpMethod}}
{{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}
{{#hasProduces}}@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
<beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<jersey2-version>2.35</jersey2-version>
<jackson-version>2.9.9</jackson-version>
<junit-version>4.13.1</junit-version>
<logback-version>1.2.10</logback-version>
Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/jaxrs-datelib-j8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<swagger-core-version>1.5.18</swagger-core-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<jersey2-version>2.35</jersey2-version>
<jackson-version>2.9.9</jackson-version>
<junit-version>4.13.1</junit-version>
<logback-version>1.2.10</logback-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@PATCH
@javax.ws.rs.PATCH

@Consumes({ "application/json" })
@Produces({ "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public FakeApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@POST
@javax.ws.rs.POST
@Path("/create_xml_item")
@Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" })

Expand All @@ -77,7 +77,7 @@ public Response createXmlItem(@ApiParam(value = "XmlItem Body", required = true)
throws NotFoundException {
return delegate.createXmlItem(xmlItem, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/outer/boolean")

@Produces({ "*/*" })
Expand All @@ -89,7 +89,7 @@ public Response fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as po
throws NotFoundException {
return delegate.fakeOuterBooleanSerialize(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/outer/composite")

@Produces({ "*/*" })
Expand All @@ -101,7 +101,7 @@ public Response fakeOuterCompositeSerialize(@ApiParam(value = "Input composite a
throws NotFoundException {
return delegate.fakeOuterCompositeSerialize(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/outer/number")

@Produces({ "*/*" })
Expand All @@ -113,7 +113,7 @@ public Response fakeOuterNumberSerialize(@ApiParam(value = "Input number as post
throws NotFoundException {
return delegate.fakeOuterNumberSerialize(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/outer/string")

@Produces({ "*/*" })
Expand All @@ -125,7 +125,7 @@ public Response fakeOuterStringSerialize(@ApiParam(value = "Input string as post
throws NotFoundException {
return delegate.fakeOuterStringSerialize(body, securityContext);
}
@PUT
@javax.ws.rs.PUT
@Path("/body-with-file-schema")
@Consumes({ "application/json" })

Expand All @@ -137,7 +137,7 @@ public Response testBodyWithFileSchema(@ApiParam(value = "", required = true) @N
throws NotFoundException {
return delegate.testBodyWithFileSchema(body, securityContext);
}
@PUT
@javax.ws.rs.PUT
@Path("/body-with-query-params")
@Consumes({ "application/json" })

Expand All @@ -149,7 +149,7 @@ public Response testBodyWithQueryParams(@ApiParam(value = "", required = true) @
throws NotFoundException {
return delegate.testBodyWithQueryParams(query, body, securityContext);
}
@PATCH
@javax.ws.rs.PATCH

@Consumes({ "application/json" })
@Produces({ "application/json" })
Expand All @@ -161,7 +161,7 @@ public Response testClientModel(@ApiParam(value = "client model", required = tru
throws NotFoundException {
return delegate.testClientModel(body, securityContext);
}
@POST
@javax.ws.rs.POST

@Consumes({ "application/x-www-form-urlencoded" })

Expand All @@ -177,7 +177,7 @@ public Response testEndpointParameters(@ApiParam(value = "None", required=true)
throws NotFoundException {
return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binaryBodypart, date, dateTime, password, paramCallback, securityContext);
}
@GET
@javax.ws.rs.GET

@Consumes({ "application/x-www-form-urlencoded" })

Expand All @@ -190,7 +190,7 @@ public Response testEnumParameters(@ApiParam(value = "Header parameter enum test
throws NotFoundException {
return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, securityContext);
}
@DELETE
@javax.ws.rs.DELETE



Expand All @@ -202,7 +202,7 @@ public Response testGroupParameters(@ApiParam(value = "Required String in group
throws NotFoundException {
return delegate.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })

Expand All @@ -214,7 +214,7 @@ public Response testInlineAdditionalProperties(@ApiParam(value = "request body",
throws NotFoundException {
return delegate.testInlineAdditionalProperties(param, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })

Expand All @@ -226,7 +226,7 @@ public Response testJsonFormData(@ApiParam(value = "field1", required=true) @Fo
throws NotFoundException {
return delegate.testJsonFormData(param, param2, securityContext);
}
@PUT
@javax.ws.rs.PUT
@Path("/test-query-parameters")


Expand All @@ -238,7 +238,7 @@ public Response testQueryParameterCollectionFormat(@ApiParam(value = "", require
throws NotFoundException {
return delegate.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public FakeClassnameTestApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@PATCH
@javax.ws.rs.PATCH

@Consumes({ "application/json" })
@Produces({ "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public PetApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@POST
@javax.ws.rs.POST

@Consumes({ "application/json", "application/xml" })

Expand All @@ -76,7 +76,7 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t
throws NotFoundException {
return delegate.addPet(body, securityContext);
}
@DELETE
@javax.ws.rs.DELETE
@Path("/{petId}")


Expand All @@ -94,7 +94,7 @@ public Response deletePet(@ApiParam(value = "Pet id to delete", required = true)
throws NotFoundException {
return delegate.deletePet(petId, apiKey, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/findByStatus")

@Produces({ "application/xml", "application/json" })
Expand All @@ -112,7 +112,7 @@ public Response findPetsByStatus(@ApiParam(value = "Status values that need to b
throws NotFoundException {
return delegate.findPetsByStatus(status, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/findByTags")

@Produces({ "application/xml", "application/json" })
Expand All @@ -130,7 +130,7 @@ public Response findPetsByTags(@ApiParam(value = "Tags to filter by", required =
throws NotFoundException {
return delegate.findPetsByTags(tags, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/{petId}")

@Produces({ "application/xml", "application/json" })
Expand All @@ -146,7 +146,7 @@ public Response getPetById(@ApiParam(value = "ID of pet to return", required = t
throws NotFoundException {
return delegate.getPetById(petId, securityContext);
}
@PUT
@javax.ws.rs.PUT

@Consumes({ "application/json", "application/xml" })

Expand All @@ -166,7 +166,7 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t
throws NotFoundException {
return delegate.updatePet(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })

Expand All @@ -183,7 +183,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be
throws NotFoundException {
return delegate.updatePetWithForm(petId, name, status, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public StoreApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@DELETE
@javax.ws.rs.DELETE
@Path("/order/{order_id}")


Expand All @@ -69,7 +69,7 @@ public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be
throws NotFoundException {
return delegate.deleteOrder(orderId, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/inventory")

@Produces({ "application/json" })
Expand All @@ -83,7 +83,7 @@ public Response getInventory(@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.getInventory(securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/order/{order_id}")

@Produces({ "application/xml", "application/json" })
Expand All @@ -97,7 +97,7 @@ public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetch
throws NotFoundException {
return delegate.getOrderById(orderId, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/order")

@Produces({ "application/xml", "application/json" })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public UserApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@POST
@javax.ws.rs.POST



Expand All @@ -69,7 +69,7 @@ public Response createUser(@ApiParam(value = "Created user object", required = t
throws NotFoundException {
return delegate.createUser(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/createWithArray")


Expand All @@ -81,7 +81,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object
throws NotFoundException {
return delegate.createUsersWithArrayInput(body, securityContext);
}
@POST
@javax.ws.rs.POST
@Path("/createWithList")


Expand All @@ -93,7 +93,7 @@ public Response createUsersWithListInput(@ApiParam(value = "List of user object"
throws NotFoundException {
return delegate.createUsersWithListInput(body, securityContext);
}
@DELETE
@javax.ws.rs.DELETE
@Path("/{username}")


Expand All @@ -106,7 +106,7 @@ public Response deleteUser(@ApiParam(value = "The name that needs to be deleted"
throws NotFoundException {
return delegate.deleteUser(username, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/{username}")

@Produces({ "application/xml", "application/json" })
Expand All @@ -120,7 +120,7 @@ public Response getUserByName(@ApiParam(value = "The name that needs to be fetch
throws NotFoundException {
return delegate.getUserByName(username, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/login")

@Produces({ "application/xml", "application/json" })
Expand All @@ -133,7 +133,7 @@ public Response loginUser(@ApiParam(value = "The user name for login", required
throws NotFoundException {
return delegate.loginUser(username, password, securityContext);
}
@GET
@javax.ws.rs.GET
@Path("/logout")


Expand All @@ -145,7 +145,7 @@ public Response logoutUser(@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.logoutUser(securityContext);
}
@PUT
@javax.ws.rs.PUT
@Path("/{username}")


Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/jaxrs-jersey/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<swagger-core-version>1.5.18</swagger-core-version>
<beanvalidation-version>2.0.2</beanvalidation-version>
<jetty-version>9.2.9.v20150224</jetty-version>
<jersey2-version>2.22.2</jersey2-version>
<jersey2-version>2.35</jersey2-version>
<jackson-version>2.9.9</jackson-version>
<junit-version>4.13.1</junit-version>
<logback-version>1.2.10</logback-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
this.delegate = delegate;
}

@PATCH
@javax.ws.rs.PATCH

@Consumes({ "application/json" })
@Produces({ "application/json" })
Expand Down
Loading