Whether None or Some(Schema::Object(...)) is more permissive is arguably a matter of perspective. If you consider the JSON Schema to be a a validation target then None could be argued to mean "and I don't care about anything else", while if it's a normative schema then None would mean "and nothing else is accepted".
Following the latter interpretation, any non-None schema would be more permissive than None.
I also believe that the expected behaviour is always that a "newtype" (a single flattened field) behaves identically to the type that it wraps, modulo explicitly requested differences.
Fixes #259, motivated by https://github.com/stackabletech/operator-rs/pull/752
Whether
None
orSome(Schema::Object(...))
is more permissive is arguably a matter of perspective. If you consider the JSON Schema to be a a validation target thenNone
could be argued to mean "and I don't care about anything else", while if it's a normative schema thenNone
would mean "and nothing else is accepted".Following the latter interpretation, any non-
None
schema would be more permissive thanNone
.I also believe that the expected behaviour is always that a "newtype" (a single flattened field) behaves identically to the type that it wraps, modulo explicitly requested differences.