-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Right now Bean generation can be made strict via the strictObjects option. This means that, if this option is provided, bean generator and build bean generator won't add the JsonIgnoreProperties decorator, which means deserialisation for these objects will fail if their definition contains unknown keys.
This option was not extended to union generators, so right now it is possible to commit accidental mistakes like:
my-union-type:
type: first-type
first-type:
first-field: foo
accidentally-indented-field: this should not be indented and sadly will be ignored because it is indented below a union type
To prevent this kind of accidental mistakes, it would be cool if we could have a new option strictUnions that would behave the same way as strictObjects but prevents the union generator from adding the JsonIgnoreProperties decorator.
I'll self assign this for now as I plan to take a stab at this and create a PR
Metadata
Metadata
Assignees
Labels
No labels