You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Builders for codegen model DTOs (GenerationTargetClassDto & friends) #415
Tests (and API consumers) construct the codegen model DTOs field-by-field via setters, which makes test code verbose — e.g. RoasterCodeGeneratorTest builds a GenerationTargetClassDto through ~10 setter calls per case. A fluent builder per DTO would shrink this considerably and double as a nicer public API surface for anyone driving the generator programmatically.
Scope — codegen-core model DTOs (public API)
These are the DTOs an API user assembles to call the generator, ordered by payoff:
GenerationTargetClassDto — the root target, biggest test-code win
BuilderDefinitionDto, BuilderFieldDto, BuilderMethodDto, BuilderNestedTypeDto are processor-internal rather than API surface — builders would still slim down tests; lower priority, could be a second step.
Notes
Builder style could follow the generated builders this project itself produces (X.builder().field(v)...build()), or reuse the project's own annotation processor to generate them.
Alternatively the DTOs could become records with canonical constructors — bigger refactor, changes all consumers.
Activity
feat(codegen-core): Class-based import constructors + AnnotationDto t…
feat: generate fluent builders for codegen model DTOs (#415) (#429)