Skip to content

Commit

Permalink
Add recipe to upgrade to springdoc-openapi 2 (#433)
Browse files Browse the repository at this point in the history
Closes #430
  • Loading branch information
Mistborn94 authored Sep 13, 2023
1 parent a228894 commit a205d7c
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions src/main/resources/META-INF/rewrite/spring-boot-30.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ recipeList:
- org.openrewrite.java.spring.boot3.ConfigurationOverEnableSecurity
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_0
- org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
- org.openrewrite.java.spring.boot3.UpgradeSpringDoc_2
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0
- org.openrewrite.java.spring.cloud2022.UpgradeSpringCloud_2022
- org.openrewrite.hibernate.MigrateToHibernate61
Expand Down Expand Up @@ -862,3 +863,80 @@ recipeList:
- org.openrewrite.java.spring.ChangeSpringPropertyKey:
oldPropertyKey: management.trace.include
newPropertyKey: management.httpexchanges.recording.include
---
type: specs.openrewrite.org/v1beta/recipe

name: org.openrewrite.java.spring.boot3.UpgradeSpringDoc_2
displayName: Upgrade to springodc-openapi 2
description: >
Migrate applications to the latest spring-doc 2 release. This recipe will modify an
application's build files and make changes code changes for removed/updated APIs.
See the [upgrade guide](https://springdoc.org/#migrating-from-springdoc-v1)
tags:
- spring
recipeList:
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-data-rest
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-groovy
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-hateoas
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-javadoc
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-kotlin
- org.openrewrite.java.dependencies.RemoveDependency:
groupId: org.springdoc
artifactId: springdoc-openapi-security
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-common
newArtifactId: springdoc-openapi-starter-common
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webmvc-core
newArtifactId: springdoc-openapi-starter-webmvc-api
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webflux-core
newArtifactId: springdoc-openapi-starter-webflux-api
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-ui
newArtifactId: springdoc-openapi-starter-webmvc-ui
newVersion: 2.x
- org.openrewrite.java.dependencies.ChangeDependency:
oldGroupId: org.springdoc
oldArtifactId: springdoc-openapi-webflux-ui
newArtifactId: springdoc-openapi-starter-webflux-ui
newVersion: 2.x
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.SpringDocUtils
newFullyQualifiedTypeName: org.springdoc.core.utils.SpringDocUtils
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.api.annotations.ParameterObject
newFullyQualifiedTypeName: org.springdoc.core.annotations.ParameterObject
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.GroupedOpenApi
newFullyQualifiedTypeName: org.springdoc.core.models.GroupedOpenApi
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.customizers.OpenApiCustomiser
newFullyQualifiedTypeName: org.springdoc.core.customizers.OpenApiCustomizer
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.Constants
newFullyQualifiedTypeName: org.springdoc.core.utils.Constants
- org.openrewrite.java.ChangeType:
oldFullyQualifiedTypeName: org.springdoc.core.SwaggerUiConfigParameters
newFullyQualifiedTypeName: org.springdoc.core.properties.SwaggerUiConfigParameters
- org.openrewrite.java.ChangeMethodName:
methodPattern: org.springdoc.core.models.GroupedOpenApi.Builder addOpenApiCustomiser(..)
newMethodName: addOpenApiCustomizer
matchOverrides: true

0 comments on commit a205d7c

Please sign in to comment.