This repository was archived by the owner on Jan 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
Globally specify operation serializer options #94
Comments
What is your use case for this? Perhaps there is a way we can solve it without adding any more configuration options. |
Current use case is as I mentioned, here's my Spine branch changes: if isNewResource {
URL = router.URLForResourceType(resource.resourceType)
method = "POST"
options = [.IncludeToOne, .IncludeToMany, .OmitNullValues]
} else {
URL = router.URLForQuery(Query(resource: resource))
method = "PATCH"
options = [.IncludeID, .OmitNullValues]
} |
Why do you want to omit null values? If it's because of overwriting attributes that weren't fetched, I recommend trying the |
thanks @wvteijlingen yeah dirty checking also achieves what I wish for. However this still requires me to create an instance of I'd like to be able to globally specify all SerializeOperations always dirty check. |
markst
added a commit
to Papercloud/Spine
that referenced
this issue
Jan 31, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We'd like to globally specify
OmitNullValues
as a default option when serializing, or perhaps even be able 8000 to specify endpoint specific options...The text was updated successfully, but these errors were encountered: