-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Allowing the support for missing keys in Toml #1377
Allowing the support for missing keys in Toml #1377
Conversation
Hello 👋 Thanks for this contirbution! At firs glance:
|
@dduportal , thanks for the review. I've pushed spelling corrections & ran |
I've created the documentation PR at #1377 I'm not familiar with the macros being used, but I think the list of parameters (including the new one) should be taken from the code directly. However, I've fixed the Toml example since the keys should start with |
Thanks @dcoraboeuf for the PR, and @dduportal for your review |
Small nit after a quick glance, I'm wondering if |
Good idea. Is that ok for you @dcoraboeuf ? |
Co-authored-by: Olivier Vernin <olivier@vernin.me>
Indeed we generated a jsonschema based on the code (and its comments) and then that jsonschema is used to generate the website |
My IDE is configured to do it automatically when I save a file |
No problem. I'll provide a commit soon. |
Head branch was pushed to by a user without write access
I've changed |
This PR proposes the support for missing keys when targeting TOML files.
Use case:
Today, this fails because
updatecli
requires the key to be already there.By adding
allowMissingKey: true
to the spec, thetarget
won't fail but just create the key when missing. By default,allowMissingKey
remainsfalse
, keeping the initial behavior (raising an error about the missing key).Two tests have been added:
allowMissingKey
)allowMissingKey
istrue
Test
To test this pull request, you can run the following commands:
cp pkg/plugins/resources/toml go test
Additional Information
Potential improvement
I did not find the documentation in the
updatecli
repository. Where can I edit the documentation?