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

Add custom prefix or suffix to generated types

Open amondnet opened this issue 10 months ago • 5 comments

Add a new configuration option typePrefix and typeSuffix to the CodeGenConfig class and update the code generation methods to append the typePrefix and typeSuffix to the generated type names.

fix https://github.com/Netflix/dgs-codegen/issues/389 fix https://github.com/Netflix/dgs-codegen/issues/323

amondnet avatar Jan 07 '25 09:01 amondnet

@amondnet looks really great and I would really look forward to have this merged or published ASAP - or, if things can't go rapidly enough here, re-publishing your fork directly via GPP under different co-ords so that everyone interested in it could temporarily use it easily until it's merged upstream

FyiurAmron avatar Jan 16 '25 18:01 FyiurAmron

We too are looking forward to this

andywgarcia avatar Feb 04 '25 19:02 andywgarcia

+1

oymo avatar Mar 27 '25 06:03 oymo

+1

PomJazon avatar Mar 28 '25 00:03 PomJazon

+1

Max-lau72 avatar Mar 28 '25 00:03 Max-lau72

Hey, I'd really appreciate those changes being merged. In my case we need to expose REST API along Graphql API. Suffixing Graphql types would greatly improve developer experience. Currently we use kotlin import aliases whenever needed but with another API in codebase it will quickly get out of control 😅

@amondnet Great work! I've rebased your changes onto master. Cleaned it up from * imports and adjusted commit message.

@mbossenbroek @srinivasankavitha Could you please take a look and consider those changes?

Thank you!

dwilkolek avatar Apr 08 '25 20:04 dwilkolek