Migrate from @ApiModelProperty to @Schema

Apache 2.0

Converts the @ApiModelProperty annotation to @Schema and converts the "value" attribute to "description".

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

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 ApiModelProperty to Schema
  2. Change annotation attribute name @Schema(value) to @Schema(description)
  3. Remove annotation attribute @Schema(position)
  4. Remove annotation attribute @Schema(notes)
  5. Change annotation attribute name @Schema(dataType) to @Schema(type)
  6. Change annotation attribute name @Schema(allowEmptyValue) to @Schema(nullable)