Closed Kurru closed 2 years ago
Hey @Kurru, thanks for the suggestion. Unfortunately, the jsonschema2Pojo
reference does not provide a way to attach annotations to the generated fields inside the model class files. Additionally, as you mentioned, adding @Nullable
to the fields may produce "false positives" because whether or not a field is always null or sometimes null depends on the request/response. Additionally, Alpaca does not provide a list of what fields are "nullable" in their documentation.
Is it possible to annotate the generated json apis with Nullable for the fields which may not always be set.
In my opinion, this could help improve the quality of my code by avoiding accidental NullPointerExceptions, though perhaps it would have too many false positives...