Michael Sela
11/09/2023, 12:39 PM{
"loanAppId": {{jsonPath request.body '$.loanAppId'}},
"applicantScores": [
{{#with (jsonPath request.body '$.applicants') }}
{{#each this as | applicant |}}
{
"externalId": "{{applicant.externalId}}",
"id": "{{applicant.id}}",
"score": 0.01,
"declineReasons": [{
"reasonLabel": "ir5",
"reasonDescription": "Desc",
"declineRuleLabel": "label",
"priorityOrder": 1
}]
}
{{#unless @last}},{{/unless}}
{{/each}}
{{/with}}
]
}
However, in the new version , the calling service to my wiremock server now throws an error that looks like this: `Cannot deserialize value of type java.lang.Long
from Object value (token JsonToken.START_OBJECT
)\n at [Source: (BufferedReader); line: 2, column: 16] (through reference chain: [\"loanAppId\"]) com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)\n\tat com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1741)\n\tat com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToke` . One thing I noticed changing in the new version is the is that registering the ResponseTemplateTransformer
in the extensions now requires new arguments public ResponseTemplateTransformer(TemplateEngine templateEngine, boolean global, FileSource files, List<TemplateModelDataProviderExtension> templateModelDataProviders) {
. In version 2.29 that constructor only required 2. Is there anything at all you can think of between these versions that would have changed in terms of the response templating that may have caused this? In addition, maybe I am doing something wrong with registering this extension as I do not really know what the new constrcutor arguments should look like now. Thank you for any advice on this.Lee Turner
11/09/2023, 2:07 PM3.0.1
? We have just released version 3.3.1
recently so was wondering if it would be worth using that version first?