Migrate from @ApiParam to @Parameter

Apache 2.0

Converts the @ApiParam annotation to @Parameter and converts the directly mappable attributes.

org.openrewrite.openapi.swagger.MigrateApiParamToParameter
mod run . --recipe=org.openrewrite.openapi.swagger.MigrateApiParamToParameter

Install 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.

  1. Change type ApiParam to Parameter
  2. Change annotation attribute name @Parameter(value) to @Parameter(description)
  3. Remove annotation attribute @Parameter(allowMultiple)
  4. Migrate @ApiParam(defaultValue) to @Parameter(schema)
  5. Migrate @ApiParam(allowableValues) to @Parameter(schema)