Skip to content

Commit eb3193f

Browse files
authored
14 dates default output format causes deserialization error (#50)
1 parent 7f64a90 commit eb3193f

5 files changed

Lines changed: 40 additions & 7 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.sngular</groupId>
66
<artifactId>pact-annotation-processor</artifactId>
7-
<version>1.2.0</version>
7+
<version>1.2.1</version>
88

99
<name>PactDslBuilder - Annotation Processor</name>
1010
<description>Pact DSL Builder annotation processor.</description>

src/main/java/com/sngular/annotation/processor/model/DslComplexField.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88

99
import java.util.List;
1010

11+
import lombok.Builder;
1112
import lombok.EqualsAndHashCode;
1213
import lombok.NonNull;
1314
import lombok.Value;
14-
import lombok.experimental.SuperBuilder;
1515

1616
@Value
17-
@SuperBuilder
1817
@EqualsAndHashCode(callSuper = true)
1918
public class DslComplexField extends DslField {
2019

@@ -29,4 +28,19 @@ public class DslComplexField extends DslField {
2928
boolean needBuilder;
3029

3130
boolean empty;
31+
32+
@Builder
33+
private DslComplexField(
34+
final String name, @NonNull final DslComplexTypeEnum complexType, final List<DslField> fields, final String fieldType, final FieldValidations fieldValidations,
35+
final boolean needBuilder, final boolean empty) {
36+
super(name);
37+
this.complexType = complexType;
38+
this.fields = fields;
39+
this.fieldType = fieldType;
40+
this.fieldValidations = fieldValidations;
41+
this.needBuilder = needBuilder;
42+
this.empty = empty;
43+
}
44+
45+
public static class DslComplexFieldBuilder {}
3246
}

src/main/java/com/sngular/annotation/processor/model/DslField.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
package com.sngular.annotation.processor.model;
88

9+
import lombok.AllArgsConstructor;
910
import lombok.Getter;
10-
import lombok.experimental.SuperBuilder;
1111

1212
@Getter
13-
@SuperBuilder
13+
@AllArgsConstructor
1414
public class DslField {
1515

1616
private String name;

src/main/java/com/sngular/annotation/processor/model/DslSimpleField.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
package com.sngular.annotation.processor.model;
88

9+
import lombok.Builder;
910
import lombok.EqualsAndHashCode;
1011
import lombok.Value;
11-
import lombok.experimental.SuperBuilder;
1212

1313
@Value
14-
@SuperBuilder
1514
@EqualsAndHashCode(callSuper = true)
1615
public class DslSimpleField extends DslField {
1716

@@ -30,6 +29,24 @@ public class DslSimpleField extends DslField {
3029
boolean onlyValueFunction;
3130

3231
boolean empty;
32+
33+
@Builder
34+
private DslSimpleField(
35+
final String name, final String fieldType, final String functionByType, final Object defaultValue, final String suffixValue, final String formatValue,
36+
final FieldValidations fieldValidations,
37+
final boolean onlyValueFunction, final boolean empty) {
38+
super(name);
39+
this.fieldType = fieldType;
40+
this.functionByType = functionByType;
41+
this.defaultValue = defaultValue;
42+
this.suffixValue = suffixValue;
43+
this.formatValue = formatValue;
44+
this.fieldValidations = fieldValidations;
45+
this.onlyValueFunction = onlyValueFunction;
46+
this.empty = empty;
47+
}
48+
49+
public static class DslSimpleFieldBuilder {}
3350
}
3451

3552

src/main/java/com/sngular/annotation/processor/model/FieldValidations.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ public class FieldValidations {
2121

2222
String regex;
2323

24+
public static class FieldValidationsBuilder {}
25+
2426
}

0 commit comments

Comments
 (0)