Open pneumcke opened 6 years ago
hi @pneumcke, , can you please try with https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0 ? and let me know if there is still something wrong?
v3.0.4 - same issue: @ApiParam(value = "desciption " ,required=true )
Description
Having a multiline string in the definition of a request body leads to a multiline @ApiParam annotation in the generated file which results in compile errors
Swagger-codegen version
3.0.0-rc1
Swagger declaration file content or url
https://berlingroup.stackstorage.com/s/d4KSrRW9bDYmrSg
line 8691 defines the request body "paymentInitiation" with a multiline description:
Command line used for generation
java -jar swagger-codegen-cli-3.0.0-rc1.jar generate -l jaxrs-jersey -i psd2-api\ 1.2\ Update\ 2018-08-17.yaml --api-package test --model-package test --library jersey2
Steps to reproduce
Have a look at the generated file src/gen/java/test/V1Api.java. Line 1231 shows the invalid @ApiParam:
Suggest a fix/enhancement
Multiline descriptions work for parameters. See e.g. line 8168 in the yaml file, where a parameter "paymentService" is defined:
This leads to a totally valid single line @ApiParam definition, see e.g. Line 121 in the generated file V1Api.java.
Please handle multine descriptions for requestBodies exactly as in parameters.