Nullability of optional fields in manifests and descriptors
It's not clear whether optional fields in manifests and descriptors can be null. By extension, it's also not clear whether or not the canonicalized form of a manifest should omit or set to null any optional fields that are not provided.
I noticed that the config spec and schema allows that optional fields may be null: https://github.com/opencontainers/image-spec/blob/8b9d41f48198a7d6d0a5c1a12dc2d1f7f47fc97f/config.md?plain=1#L93
The schemas for manifests and descriptors don't allow for null values. Should the spec be updated to clarify this? Happy to do that.
From the Go implementations, the preference is to omit the field, rather than explicitly set it to null, in the JSON. That's seen with omitempty defined on various fields. I don't believe this is a hard requirement, but it's a convention you'll see from most implementations.