forked from loafle/openapi-generator-original
* formParams.mustache should contain @FormParam, not @QueryParam (#20991) * updated samples; form parameters are declared using @FormParam, not @QueryParam (#20991)
This commit is contained in:
parent
c6e2a5fa94
commit
36287acfd6
@ -13,7 +13,7 @@
|
||||
|
||||
}}{{^vendorExtensions.x-multipart}}{{!
|
||||
}}{{#defaultValue}} @DefaultValue("{{{.}}}"){{/defaultValue}}{{!
|
||||
}} @QueryParam("{{baseName}}"){{!
|
||||
}} @FormParam("{{baseName}}"){{!
|
||||
|
||||
}} {{{dataType}}} {{paramName}}{{!
|
||||
}}{{/vendorExtensions.x-multipart}}{{!
|
||||
|
@ -248,7 +248,7 @@ public class FakeApi {
|
||||
},security = {
|
||||
@SecurityRequirement(name = "http_basic_test")
|
||||
}, tags={ "fake", })
|
||||
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)
|
||||
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)
|
||||
throws NotFoundException {
|
||||
return delegate.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binaryBodypart, date, dateTime, password, paramCallback, securityContext);
|
||||
}
|
||||
@ -261,7 +261,7 @@ public class FakeApi {
|
||||
@ApiResponse(responseCode = "404", description = "Not found", content =
|
||||
@Content(schema = @Schema(implementation = Void.class))),
|
||||
}, tags={ "fake", })
|
||||
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)
|
||||
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)
|
||||
throws NotFoundException {
|
||||
return delegate.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, securityContext);
|
||||
}
|
||||
@ -309,7 +309,7 @@ public class FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content =
|
||||
@Content(schema = @Schema(implementation = Void.class))),
|
||||
}, tags={ "fake", })
|
||||
public Response testJsonFormData(@Schema(description = "field1") @QueryParam("param") String param,@Schema(description = "field2") @QueryParam("param2") String param2,@Context SecurityContext securityContext)
|
||||
public Response testJsonFormData(@Schema(description = "field1") @FormParam("param") String param,@Schema(description = "field2") @FormParam("param2") String param2,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.testJsonFormData(param, param2, securityContext);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public class PetApi {
|
||||
},security = {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}, tags={ "pet", })
|
||||
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)
|
||||
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)
|
||||
throws NotFoundException {
|
||||
return delegate.updatePetWithForm(petId, name, status, securityContext);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user