Skip to content

Improve documentation on default value forms #9057

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

Open
glopesdev opened this issue May 22, 2025 · 0 comments
Open

Improve documentation on default value forms #9057

glopesdev opened this issue May 22, 2025 · 0 comments

Comments

@glopesdev
Copy link

glopesdev commented May 22, 2025

The article https://github.com/dotnet/templating/wiki/Naming-and-default-value-forms is misleading in at least two ways:

  1. The convention on the naming of sourceName is much more rigid than what is implied by the wording in the article. Specifically, using uppercase, lowercase, the . character and the numeric character 1 are all absolutely critical for controlling which exact value form is applied (as discussed in Documentation Improvements #2532 (comment)).

The article states "A good choice for sourceName is the value that produces distinct values under the below transformations, for example Template.1". This is more than just a "good choice", it is actually the exact way you need to use it! The above linked issue was closed as not planned but I have validated all recommendations still hold today and the number of open issues and past discussions suggests confusion still prevails around default value forms, e.g. #6853

  1. Although it describes the convention and the possible default value forms, the article fails to mention they are all actually accessible as built-in value transforms in the templating engine! There is a link for the article on creating new value transforms, but even more useful would be to know which ones exist in the first place.

For example, one option would be using the actual form identifiers in the table, or add an explicit column with the identifiers, e.g.:

  • identity
  • safe_namespace
  • safe_name
  • lower_safe_namespace
  • lower_safe_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant