"Optional" properties #782
Unanswered
Plastonick
asked this question in
Ideas
Replies: 1 comment 3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Has there been a discussion around intentional "optional" properties before?
I'm meaning, being able to distinguish between a property that does exist and potentially has a nullable value, and one that does not exist in the source.
Consider:
currently we can't really distinguish between the case of mapping from source
{}and source{"foo":null}which might be important especially in the case of patch endpoints that distinguish between setting a value to null, and not modifying a value.Have we ever considering allowing wrapping our arguments in something like rust's optional type which can be either None or Some(value) to allow for that distinction? Or is there an existing way we can distinguish those cases?
I'd happily put something together for this if it wouldn't be an immediate rejection.
Beta Was this translation helpful? Give feedback.
All reactions