Migrate from @ApiResponses to @ApiResponses
Apache 2.0Changes the namespace of the @ApiResponses and @ApiResponse annotations and converts its attributes (ex. code -> responseCode, message -> description, response -> content).
org. openrewrite. openapi. swagger. MigrateApiResponsesToApiResponsesmod run . --recipe= org. openrewrite. openapi. swagger. MigrateApiResponsesToApiResponsesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Change type
io.swagger.annotations.ApiResponsestoio.swagger.v3.oas.annotations.responses.ApiResponses - Change type
io.swagger.annotations.ApiResponsetoio.swagger.v3.oas.annotations.responses.ApiResponse - Change annotation attribute name
@ApiResponse(code)to@ApiResponse(responseCode) - Change annotation attribute name
@ApiResponse(message)to@ApiResponse(description) - Convert API response codes to strings
- Convert API response to content annotation
- Convert API responseHeaders to headers