Migrate from @ApiOperation to @Operation
Apache 2.0Converts the @ApiOperation annotation to @Operation and converts the directly mappable attributes and removes the others.
org. openrewrite. openapi. swagger. MigrateApiOperationToOperationmod run . --recipe= org. openrewrite. openapi. swagger. MigrateApiOperationToOperationInstall 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
ApiOperationtoOperation - Change annotation attribute name
@Operation(notes)to@Operation(description) - Change annotation attribute name
@Operation(value)to@Operation(summary) - Change annotation attribute name
@Operation(nickname)to@Operation(operationId) - Change annotation attribute name
@Operation(httpMethod)to@Operation(method) - Remove annotation attribute
@Operation(response) - Remove annotation attribute
@Operation(consumes) - Remove annotation attribute
@Operation(produces)