-
Notifications
You must be signed in to change notification settings - Fork 58
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
Please state defaults for optional parameters #248
Comments
Agree that would be handy; the challenge is we don't set those defaults on the fields, so it's hard to have them available when we generate the documentation in rewrite-recipe-markdown-generator. In a case like this one the default can be found by clicking on the GitHub link, which shows it used further down. That's not optiomal of course, but figured that might help you for now. |
Thank you for the hint. I should have picked another example - I cannot quickly see the default |
No worries; on that one there is no default value, as all options are required unless they are specifically marked as |
Going to close this issue as I don't believe there is anything we can do to address this problem. I definitely understand the confusion -- but this is an underlying issue with how recipes are defined. Many recipes that have optional parameters do not have a "default" (as @timtebeek mentioned). For instance, an optional boolean is not really a "boolean" in the traditional sense. Not providing true or false could actually result in the recipe producing something different than providing it with true or false. If there are particular recipes that you find confusing, I'd encourage you to submit a PR or open an issue in the GitHub repository where the recipe exists. We can update the descriptions of the parameters themselves to be clearer -- which would then carry over into the auto-generated docs. You can find the GitHub repository for any recipe by navigating to the recipe page in the docs and pressing the Hope that helps. |
GitHub actions make a good job explaining their parameters - and their default values.
Here, there is no list of default values.
Example: https://docs.openrewrite.org/recipes/java/logging/printstacktracetologerror.
I don't know if the Boolean default is true or false, what would be a really sensible value etc.
The text was updated successfully, but these errors were encountered: