C#C
C#2y ago
Dachi

✅ Api request matching issue

i have this method
public async Task<ActionResult<ApiServiceResponse<CommissionDto>>> AutomaticOperationSave(
[FromBody] AutomaticOperation request, CancellationToken cancellationToken)

and then api respons comes it cannot match with the AutomaticOperation.
that class extends class operation that looks like this

[DisplayName("ოპერაცია")]
public class Operation : JDateTimesAndSelectable.


and error looks like this:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-2d09e0cccda2990b5453fa03ae4749e6-03b1d5d212e40e2d-00",
"errors": {
"request": [
"The ოპერაცია field is required."
],
"$.OperationDate": [
"The JSON value could not be converted to System.DateTime. Path: $.OperationDate | LineNumber: 19 | BytePositionInLine: 42."
]
}
}

Can you please help me?
Was this page helpful?