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

Generate the types using Record type

Open hantsy opened this issue 3 years ago • 3 comments

If the Java version is set to the newest version , eg 16, generating Records instead of the POJOs.

hantsy avatar Jun 12 '21 12:06 hantsy

We'll have to wait for JavaPoet to support records. They have an open issue (and possibly an open PR) for that: https://github.com/square/javapoet/issues/829

paulbakker avatar Jun 14 '21 22:06 paulbakker

Linking related discussions.

There is indeed a PR for providing record support in JavaPoet: https://github.com/square/javapoet/pull/840

However, the future of JavaPoet seems to be under discussion: https://github.com/square/javapoet/discussions/866

There is a fork which already includes record support: https://github.com/FabricMC/javapoet

Ernir avatar Apr 29 '23 14:04 Ernir

Linking related discussions.

There is indeed a PR for providing record support in JavaPoet: square/javapoet#840

However, the future of JavaPoet seems to be under discussion: square/javapoet#866

There is a fork which already includes record support: https://github.com/FabricMC/javapoet

Update from the discussion linked above - there is now a fork of Javapoet which looks like it's actively maintained, by Palantir: https://github.com/palantir/javapoet

Ernir avatar Sep 07 '24 10:09 Ernir