Skip to content

Commit

Permalink
Corrections code in byte set in pactDslJsonBody
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Simoes committed Dec 6, 2023
1 parent 7c210d8 commit d9b46c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public final String getFieldType() {

@Override
public final String getFunctionType() {
return "numberType";
return "integerType";
}

@Override
public final String getFunctionOnlyValue() {
return "byteValue";
return "integerType";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public final String getFunctionType() {

@Override
public final String getFunctionOnlyValue() {
return "shortValue";
return "integerValue";
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/templates/templateDslBuilder.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
pactDslJsonBody.${field.functionByType}("${field.name}", ${field.name}.intValue());
<#elseif field.fieldType == "float">
pactDslJsonBody.${field.functionByType}("${field.name}", (double) ${field.name});
<#elseif field.fieldType == "byte">
pactDslJsonBody.${field.functionByType}("${field.name}", (int) ${field.name});
<#else>
pactDslJsonBody.${field.functionByType}("${field.name}", ${field.name});
</#if>
Expand Down

0 comments on commit d9b46c5

Please sign in to comment.