Repository navigation
Nullability in the new Admin Api #40145
shawkins
started this conversation in
API guidelines
Replies: 1 comment
|
Note that in the current admin-client logic, the client side is attempting to serialize and deserialize flexibly: So null values are not being sent to the server, and any additional fields in the response are silently ignored. We'll open another discussion point on that latter handling for both the client and server. |
0 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.
Related to #38551 we will not have / allow explicit null values in our api. If a field is set to null in a PUT or POST, it will be pruned and subject to defaulting.
The object model will enforce this by using a global JsonInclude for only non absent values.
This is similar to the Kubernetes handling for fields that are note explicitly set to nullable: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting-and-nullable
The only time a null value will have a semantic meaning is in a JSON Merge patch, where a null value indicates removal of the field.
See also #40110
All reactions