forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix [jaxrs-jersey][java][jersey] multipart/form-data file array issue…
… on generating jaxrs-jersey. This commit aims to fix OpenAPITools#7330 with described solution 'choice C'.
- Loading branch information
Showing
5 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
modules/openapi-generator/src/main/resources/JavaJaxRS/formParams.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
{{#isFormParam}}{{^isFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/isFile}}{{#isFile}} | ||
@FormDataParam("{{baseName}}") InputStream {{paramName}}InputStream, | ||
@FormDataParam("{{baseName}}") FormDataContentDisposition {{paramName}}Detail{{/isFile}}{{/isFormParam}} | ||
{{^isListContainer}} @FormDataParam("{{baseName}}") FormDataBodyPart {{paramName}}Bodypart {{/isListContainer}}{{#isListContainer}} @FormDataParam("{{baseName}}") List<FormDataBodyPart> {{paramName}}Bodypart {{/isListContainer}}{{/isFile}}{{/isFormParam}} |
2 changes: 1 addition & 1 deletion
2
modules/openapi-generator/src/main/resources/JavaJaxRS/serviceFormParams.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}InputStream {{paramName}}InputStream, FormDataContentDisposition {{paramName}}Detail{{/isFile}}{{/isFormParam}} | ||
{{#isFormParam}}{{^isFile}}{{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}}{{^isListContainer}}FormDataBodyPart {{paramName}}Bodypart{{/isListContainer}}{{#isListContainer}}List<FormDataBodyPart> {{paramName}}Bodypart{{/isListContainer}}{{/isFile}}{{/isFormParam}} |