Skip to content

Commit

Permalink
Use version of dependency manipulation recipe which works for both Gr…
Browse files Browse the repository at this point in the history
…adle and Maven
  • Loading branch information
sambsnyd committed Apr 17, 2024
1 parent b7a3d41 commit 2f959ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies {
testImplementation("org.openrewrite:rewrite-test")
testImplementation("org.openrewrite:rewrite-gradle")
testImplementation("org.openrewrite:rewrite-maven")
testImplementation("org.openrewrite:rewrite-core")

testImplementation("org.junit.jupiter:junit-jupiter-engine:latest.release")

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/rewrite/swagger-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ tags:
- openapi
recipeList:
# Relocated artifacts https://mvnrepository.com/artifact/io.swagger
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
- org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId:
oldGroupId: io.swagger
oldArtifactId: swagger-annotations
newGroupId: io.swagger.core.v3
newVersion: 2.2.x
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
- org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId:
oldGroupId: io.swagger
oldArtifactId: swagger-core
newGroupId: io.swagger.core.v3
newVersion: 2.2.x
- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId:
- org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId:
oldGroupId: io.swagger
oldArtifactId: swagger-models
newGroupId: io.swagger.core.v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ void shouldChangeSwaggerArtifacts() {
package example.org;
import io.swagger.annotations.ApiModel;
@ApiModel
class Example { }
""",
"""
package example.org;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema
class Example { }
"""
Expand Down

0 comments on commit 2f959ef

Please sign in to comment.