openrewrite / rewrite-recipe-markdown-generator

Utility that generates OpenRewrite recipe documentation in markdown format for all recipes on the classpath.
Apache License 2.0
2 stars 7 forks source link

Enable data table exports in the usage snippets for recipes that have custom data tables #114

Closed timtebeek closed 1 month ago

timtebeek commented 1 month ago

What problem are you trying to solve?

Make data tables more discoverable by generating recipe run snippets that enable datatables for specific recipes.

Describe the solution you'd like

We already detect which recipes have custom data tables: https://github.com/openrewrite/rewrite-recipe-markdown-generator/blob/6953e4f0d681076b45cf6ce4bbdbbf325c001874/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt#L880-L891

We also have an option to export data tables, as documented here: https://docs.openrewrite.org/running-recipes/data-tables

What I'd like to see is for any recipes that have custom data tables, that we enable that option by default for the Maven XML snippets and commandline.

Alternatives

Right now we produce a header that (wrongly) indicates data tables are unique to the Moderne platform. That's no longer the case.

Data Tables (Only available on the Moderne platform)

Alternative we could refer to the docs on how to enable data table exports explicitly, but that's less user friendly then just inserting that into the doc snippets.

Additional context

This came up in looking to document how to export parse failures; we have a recipe page for that particular recipe, but that only produces a data table not enabled by default: https://docs.openrewrite.org/recipes/core/findparsefailures

timtebeek commented 1 month ago

/cc @mike-solomon