You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Null-annotations are added on model fields based upon whether a property is required or not in a specification. A discriminator property is most often required if it is present, but the preferred approach for interacting with this is that the client should not need to set it themselves, but rather that the model sets it based upon a Jackson annotation.
This means that if tooling is used that inspects these non-null annotations, then they will yield an exception since the discriminator is never set (since it is only set by Jackson when the object is serialized).
Describe the solution you'd like
Since the discriminator is set at serialization, then the discriminator property should be excluded from having an annotation.
Describe alternatives you've considered
I have considered either dropping the annotation from the discriminator, or setting the discriminator to its required value.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Null-annotations are added on model fields based upon whether a property is required or not in a specification. A discriminator property is most often required if it is present, but the preferred approach for interacting with this is that the client should not need to set it themselves, but rather that the model sets it based upon a Jackson annotation.
This means that if tooling is used that inspects these non-null annotations, then they will yield an exception since the discriminator is never set (since it is only set by Jackson when the object is serialized).
Describe the solution you'd like
Since the discriminator is set at serialization, then the discriminator property should be excluded from having an annotation.
Describe alternatives you've considered
I have considered either dropping the annotation from the discriminator, or setting the discriminator to its required value.
Additional context
The text was updated successfully, but these errors were encountered: