Skip to content

Commit 8bf879e

Browse files
committed
updated samples; form parameters are declared using @FormParam, not @QueryParam (OpenAPITools#20991)
1 parent 98db947 commit 8bf879e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/FakeApi.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public Response testClientModel(@Schema(description = "client model", required =
248248
},security = {
249249
@SecurityRequirement(name = "http_basic_test")
250250
}, tags={ "fake", })
251-
public Response testEndpointParameters(@Schema(description = "None") @QueryParam("number") BigDecimal number,@Schema(description = "None") @QueryParam("double") Double _double,@Schema(description = "None") @QueryParam("pattern_without_delimiter") String patternWithoutDelimiter,@Schema(description = "None") @QueryParam("byte") byte[] _byte,@Schema(description = "None") @QueryParam("integer") Integer integer,@Schema(description = "None") @QueryParam("int32") Integer int32,@Schema(description = "None") @QueryParam("int64") Long int64,@Schema(description = "None") @QueryParam("float") Float _float,@Schema(description = "None") @QueryParam("string") String string,@FormDataParam("binary") FormDataBodyPart binaryBodypart,@Schema(description = "None") @QueryParam("date") Date date,@Schema(description = "None") @QueryParam("dateTime") Date dateTime,@Schema(description = "None") @QueryParam("password") String password,@Schema(description = "None") @QueryParam("callback") String paramCallback,@Context SecurityContext securityContext)
251+
public Response testEndpointParameters(@Schema(description = "None") @FormParam("number") BigDecimal number,@Schema(description = "None") @FormParam("double") Double _double,@Schema(description = "None") @FormParam("pattern_without_delimiter") String patternWithoutDelimiter,@Schema(description = "None") @FormParam("byte") byte[] _byte,@Schema(description = "None") @FormParam("integer") Integer integer,@Schema(description = "None") @FormParam("int32") Integer int32,@Schema(description = "None") @FormParam("int64") Long int64,@Schema(description = "None") @FormParam("float") Float _float,@Schema(description = "None") @FormParam("string") String string,@FormDataParam("binary") FormDataBodyPart binaryBodypart,@Schema(description = "None") @FormParam("date") Date date,@Schema(description = "None") @FormParam("dateTime") Date dateTime,@Schema(description = "None") @FormParam("password") String password,@Schema(description = "None") @FormParam("callback") String paramCallback,@Context SecurityContext securityContext)
252252
throws NotFoundException {
253253
return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binaryBodypart, date, dateTime, password, paramCallback, securityContext);
254254
}
@@ -261,7 +261,7 @@ public Response testEndpointParameters(@Schema(description = "None") @QueryParam
261261
@ApiResponse(responseCode = "404", description = "Not found", content =
262262
@Content(schema = @Schema(implementation = Void.class))),
263263
}, tags={ "fake", })
264-
public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @QueryParam("enum_form_string_array") List<String> enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @QueryParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext)
264+
public Response testEnumParameters(@Schema(description = "Header parameter enum test (string array)" , allowableValues=">, $")@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@Schema(description = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg")@HeaderParam("enum_header_string") String enumHeaderString,@Schema(description = "Query parameter enum test (string array)") @QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@Schema(description = "Query parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue = "-efg") @DefaultValue("-efg") @QueryParam("enum_query_string") String enumQueryString,@Schema(description = "Query parameter enum test (double)", allowableValues="1, -2") @QueryParam("enum_query_integer") Integer enumQueryInteger,@Schema(description = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @QueryParam("enum_query_double") Double enumQueryDouble,@Schema(description = "") @QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@Schema(description = "Form parameter enum test (string array)", allowableValues=">, $", defaultValue="$") @DefaultValue("$") @FormParam("enum_form_string_array") List<String> enumFormStringArray,@Schema(description = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @DefaultValue("-efg") @FormParam("enum_form_string") String enumFormString,@Context SecurityContext securityContext)
265265
throws NotFoundException {
266266
return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext);
267267
}
@@ -309,7 +309,7 @@ public Response testInlineFreeformAdditionalProperties(@Schema(description = "re
309309
@ApiResponse(responseCode = "200", description = "successful operation", content =
310310
@Content(schema = @Schema(implementation = Void.class))),
311311
}, tags={ "fake", })
312-
public Response testJsonFormData(@Schema(description = "field1") @QueryParam("param") String param,@Schema(description = "field2") @QueryParam("param2") String param2,@Context SecurityContext securityContext)
312+
public Response testJsonFormData(@Schema(description = "field1") @FormParam("param") String param,@Schema(description = "field2") @FormParam("param2") String param2,@Context SecurityContext securityContext)
313313
throws NotFoundException {
314314
return delegate.testJsonFormData(param, param2, securityContext);
315315
}

Diff for: samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/api/PetApi.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public Response updatePet(@Schema(description = "Pet object that needs to be add
173173
},security = {
174174
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
175175
}, tags={ "pet", })
176-
public Response updatePetWithForm(@Schema(description= "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId,@Schema(description = "Updated name of the pet") @QueryParam("name") String name,@Schema(description = "Updated status of the pet") @QueryParam("status") String status,@Context SecurityContext securityContext)
176+
public Response updatePetWithForm(@Schema(description= "ID of pet that needs to be updated", required = true) @PathParam("petId") @NotNull Long petId,@Schema(description = "Updated name of the pet") @FormParam("name") String name,@Schema(description = "Updated status of the pet") @FormParam("status") String status,@Context SecurityContext securityContext)
177177
throws NotFoundException {
178178
return delegate.updatePetWithForm(petId, name, status, securityContext);
179179
}

0 commit comments

Comments
 (0)