vojtechhabarta / typescript-generator

Generates TypeScript from Java - JSON declarations, REST service client
MIT License
1.13k stars 236 forks source link

creates 2 Interfaces if @Builder from lomok is used #981

Open dev-ale opened 1 year ago

dev-ale commented 1 year ago

Java `@Value @Builder public class Example{

@NonNull
Integer abc;
@Nullable
String name;

@NonNull
public Option<String> getName() {
    return Option.of(name);
}

}`

Typescript

export interface BetriebspunktViaGeplant {
  abc: number;
  name?: string;
}
export interface BetriebspunktViaGeplantBuilder {
  abc: number;
  name: string;
}

How can i change the output to just one interface: "BetriebspunktViaGeplant "

tomkeiev commented 1 year ago

I have faced with the same issue. I've tried to use <excludePropertyAnnotation>lombok.Builder</excludePropertyAnnotation> but it hasn't helped

michaelbub commented 4 months ago

Late, but... I did

 <excludeClassPatterns>
    <excludeClassPattern>**$*Builder</excludeClassPattern>
 </excludeClassPatterns>

for such a case.