Skip to content
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

one_not_null= treats missing keys as null valued #722

Closed
Tracked by #561
pivotaljohn opened this issue Aug 29, 2022 · 0 comments · Fixed by #730
Closed
Tracked by #561

one_not_null= treats missing keys as null valued #722

pivotaljohn opened this issue Aug 29, 2022 · 0 comments · Fixed by #730
Assignees

Comments

@pivotaljohn
Copy link
Contributor

pivotaljohn commented Aug 29, 2022

(From #707 synthesis: one_not_null= should treat the absence of a key as equivalent to present and null.)


With this schema:

#@data/values-schema
---
#@schema/type any=True
#@schema/validation one_not_null=["rootdirectory", "path"]
filesystem:
  rootdirectory: ""
  path: ""

this fails:

#@data/values
---
filesystem:
  path: ""

Instead, it should succeed, treating rootdirectory as missing to be equivalent to it being present with a null value.

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

Successfully merging a pull request may close this issue.

1 participant