Open xibz opened 8 months ago
I believe the jsonschema2pojo
plugin has a setting for generating a constructor for all required fields. Be mindful that adding such constructor and removing the default one constitutes a breaking change.
cc: @afrittoli @rjalander
If a field is required, then we should enforce it in the constructor or when calling build (if we have a builder).
https://github.com/cdevents/sdk-java/blob/5d17b750fda57fd4a9d7ad2c5baec2bb4b9e2143/sdk/src/main/java/dev/cdevents/models/build/started/Subject.java#L23-L29
But no validation