docs(function_list): add docs for toToml and fromToml functions#2035
Open
docs(function_list): add docs for toToml and fromToml functions#2035
Conversation
Explains how `toToml` and `fromToml` can be used in chart templates. Implementation detail can be seen here: helm/helm#12026. Signed-off-by: Dominik Müller <mail@dominikm.de>
- Use a realistic template-context example for toToml (wrapped in {{ }})
- Add note that toToml returns an error when nil values are present
- Fix fromToml file label from backtick inline code to prose
- Add note that fromToml returns an error on invalid TOML input
Co-Authored-By: Dominik Müller <mail@dominikm.de>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds documentation for the
toTomlandfromTomltemplate functions, rebased from #1455 (originally authored by @dominikmueller).Changes from the original PR:
main(resolves theneeds rebaselabel on Add docs for TOML functions #1455)toTomlexample to use realistic template syntax ({{ toToml .Values.config | nindent 2 }}) instead of a bare function calltoTomlreturns an error whennilvalues are present (TOML limitation)fromTomlfile label from an awkward backtick inline code format to plain prosefromTomlreturns an error on invalid TOML inputBoth functions shipped in Helm v3.17 (helm/helm#12026) and are in use but undocumented.
Test plan
toTomlandfromTomlsections🤖 Generated with Claude Code