My controller has some set of swagger annotations with large descriptions. which makes the file messy and hard to track the code.
Example code block Swagger annotations used in the file
Is there any way to hide or fold swagger or any other annotations in eclipse.
You can externalize your strings into a Constants or properties or yaml to get a clean code
@ApiParam(value = "${swagger.sample.request.ApiParam.value}")
@RequestBody(required = true)
List request,
@ApiParam(value = DocumentationConstants.SAMPLE, required = true)
@RequestHeader(value = "sample", required = true)
String example,
Ref: Externalization
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.