This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fork of ghodss/yaml to use 'on' as key in CampaignSpec (#12153)
As we noticed last week: we can't use `on` as a key in a `CampaignSpec` because `yaml.YAMLToJSON` would convert that `on` into a `true` and that in turn would fail when validated. The solution here is to use a custom fork of `ghodss/yaml` that allows passing in a custom unmarshal-function which does _not_ do the conversion. The function we're passing in comes from the yaml.v3 library which changed its behavior when parsing boolean values (see ghodss/yaml#65). We lose the ability to use `YAMLToJSONStrict` since that only works with yaml.v2, but yaml.v3 already warns about duplicated keys and the JSON schema validation gives us enough of a safety net for the rest.
- Loading branch information
Showing
4 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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