-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow parsing scalars and mappings into the same type
Some YAML schemas seem to support specifying values either as a single string, or as a dictionary. One practical example is the `image` option in `.gitlab-ci.yml` files: https://docs.gitlab.com/ee/ci/yaml/#image GitLab accepts either ```yaml test-job: image: ruby:3.0 ``` or ```yaml test-job: image: name: ruby:3.0 ``` This change enables us to support this functionality, by calling `fromString` only on scalar nodes; mappings are deserialized as usual.
- Loading branch information
1 parent
384a064
commit 6c6a49d
Showing
2 changed files
with
39 additions
and
2 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