Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing example values #490

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public String getDescription() {

@Option(displayName = "Except",
description = "Regex. If any of these property keys exist as direct children of `oldPropertyKey`, then they will not be moved to `newPropertyKey`.",
required = false)
required = false,
example = "jvm")
@Nullable
List<String> except;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ public String getDescription() {
String propertyKey;

@Option(displayName = "New value",
description = "The new value to be used for key specified by `propertyKey`.")
description = "The new value to be used for key specified by `propertyKey`.",
example = "management.metrics.enable.process.files")
String newValue;

@Option(displayName = "Old value",
required = false,
description = "Only change the property value if it matches the configured `oldValue`.")
description = "Only change the property value if it matches the configured `oldValue`.",
example = "false")
@Nullable
String oldValue;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/openrewrite/java/spring/RenameBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
@Value
public class RenameBean extends Recipe {

@Option(required = false)
@Option(required = false, example = "foo.MyType")
@Nullable
String type;

@Option
@Option(example = "fooBean")
String oldName;

@Option
@Option(example = "barBean")
String newName;

private static final String FQN_QUALIFIER = "org.springframework.beans.factory.annotation.Qualifier";
Expand Down