openrewrite / rewrite-docs

Stores the markdown documents used to generate docs.openrewrite.org
https://docs.openrewrite.org
Apache License 2.0
40 stars 46 forks source link

ChangeFieldType example #8

Closed Guseyn closed 3 years ago

Guseyn commented 3 years ago

I've tried to follow this example https://docs.openrewrite.org/java/refactoring-java-source-code/changefieldtype#yaml-definition

But I get following error:

Failed to execute goal org.openrewrite.maven:rewrite-maven-plugin:2.1.1:fix (default-cli) on project rewrite-example: Execution default-cli of goal org.openrewrite.maven:rewrite-maven-plugin:2.1.1:fix failed: Problem parsing rewrite configuration from: file:/Users/guseyn/java-projects/rewrite-example/recipes/rewrite2.yml
[ERROR] visitor was '{org.openrewrite.java.ChangeFieldType=null, type=java.util.logging.Logger, targetType=org.slf4j.Logger}' but it must be constructable
sambsnyd commented 3 years ago

I've updated the YAML Definitions to more explicitly show what needs to be done to include them in a yaml file. I believe this addresses the issue, let me know if you find it to still be incorrect/unclear: https://docs.openrewrite.org/java/refactoring-java-source-code/changefieldtype#yaml-definition