-
Notifications
You must be signed in to change notification settings - Fork 9
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
special casing fallback behavior when attribute is set to null will make it more difficult to tool against #56
Comments
It would be easier to tool against this if it read:
|
I found another use of this sort of special-casing null here: https://cps-org.github.io/cps/schema.html#requires-package
I prefer this wording for the sake of tooling:
|
Imho we should simply remove that. This also makes it harder to write a schema for it. |
Yes, I guess we should change that also, but an empty object is a valid Requirement; "or an empty object" is redundant.
|
On further consideration, I think we have two different cases here:
So, I think there are two questions that need to be answered here:
|
In JSON parsers, where you specify a structure of types and the parser tries to fill out those types, typically an unset attribute and an attribute set to null both results in a None value in an optional. In cases where you must tell the difference between an unset value and a null value, you'll end up with a nested option type. This makes it much more challenging to tool around this spec.
It would be much easier if
tag: null
meant the same as the tag not being specified. If you want to unset the values and not allow a fallback, set the value to an empty string or array. For exampletag: []
ortag: ""
would cause an overriding to an empty value.The text was updated successfully, but these errors were encountered: