Reputation: 97
My swagger file says , Biller Service has variables like
"completionTime": "HH:mm"
"officeOnlyFlag" : "Y"
"dueDate": "yyyy-MM-dd"
Here the type is String and format is "HH:mm" which is date format for completionTime. officeOnlyFlag has type String and takes values "Y" or "N" like boolean type.
In my client class , Should I specify variable as String completionTime ?
I specified String for completionTime variable , but I am getting 404 Error. I am not sure if it is because of data type in client class for completionTime or something else . I have huge response from biller service, so not sure what causing issue. But, at the same time, i need to clarify about the data type that I am specifying in my client class.
Upvotes: 0
Views: 45
Reputation: 97
In my pojo, I used JsonFormat to define the formatting as below. officeOnlyFlag is String. So, I didn't add any format.
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
private Date completionTime;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
private Date dueDate;
private String officeOnlyFlag;
Upvotes: 1