Skip to content

Commit

Permalink
Remove example from RecipeOption again
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 13, 2023
1 parent aaa902d commit dc2ecd2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class RecipeMarkdownGenerator : Runnable {
val recipeOptions = TreeSet<RecipeOption>()
for (recipeOption in recipeDescriptor.options) {
val name = recipeOption.name as String
val ro = RecipeOption(name, recipeOption.type, recipeOption.example, recipeOption.isRequired)
val ro = RecipeOption(name, recipeOption.type, recipeOption.isRequired)
recipeOptions.add(ro)
}

Expand Down
3 changes: 0 additions & 3 deletions src/main/kotlin/org/openrewrite/RecipeOption.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ import com.fasterxml.jackson.annotation.JsonIgnore
data class RecipeOption(
val name: String,
val type: String,
@JsonIgnore
val example: String?,
val required: Boolean
): Comparable<RecipeOption> {
override fun compareTo(other: RecipeOption): Int {
return compareBy(RecipeOption::name)
.then(compareBy(RecipeOption::type))
.then(compareBy(RecipeOption::example))
.then(compareBy(RecipeOption::required))
.compare(this, other)
}
Expand Down

0 comments on commit dc2ecd2

Please sign in to comment.