dgs-codegen icon indicating copy to clipboard operation
dgs-codegen copied to clipboard

Consider generating a non-nullable fields constructor when JSpecify is enabled

Open sjohnr opened this issue 1 month ago • 0 comments

Consider generating a non-nullable fields constructor when generateJSpecifyAnnotations = true.

Context:

When generateJSpecifyAnnotations = true, the no-arg constructor is never visible. This is intended so applications begin using the public all-args constructor to benefit from nullability annotations or use builders instead. Using javaGenerateAllConstructor = true enables the all-args constructor.

See also gh-900.

sjohnr avatar Dec 09 '25 18:12 sjohnr