There are various places in the JMAP spec where null values should be allowed. Specific to my use case:
2.1 Mailbox/get
This is a standard “/get” method as described in [@!RFC8620], Section 5.1. The ids argument may be null to fetch all at once.
Currently if you specify:
client.request(MailboxGet(ids=None))
the serializer class will elide the ids=null that the spec allows. This is because the serializer uses None as a default value and omits it as unspecified.
It seems there are a couple possible fixes. One is to distinguish between None and Unspecified for all models. This is a big, breaking API change, but possibly more correct. The other is to add a new type that specifically permits None that could me marked on some methods. This is less invasive.
There are various places in the JMAP spec where
nullvalues should be allowed. Specific to my use case:Currently if you specify:
the serializer class will elide the
ids=nullthat the spec allows. This is because the serializer usesNoneas a default value and omits it as unspecified.It seems there are a couple possible fixes. One is to distinguish between
NoneandUnspecifiedfor all models. This is a big, breaking API change, but possibly more correct. The other is to add a new type that specifically permitsNonethat could me marked on some methods. This is less invasive.