mastercard-api-client-tutorial icon indicating copy to clipboard operation
mastercard-api-client-tutorial copied to clipboard

generated model AuthenticationMethods have wrong type for id

Open latompa opened this issue 3 years ago • 0 comments

In this generated model Acme.App.MastercardApi.Client/Model/AuthenticationMethods.cs

the id is of type int, but the openapi spec says string

image

this causes an error when the API client tries de-serialize a response with a large ID, essentially ending up with null Data:

{
    "StatusCode": 200,
    "Headers": { ... },
    "Data": null,
    "ErrorText": "JSON integer 3123456789 is too large or small for an Int32. Path 'authenticationMethods[0].id', line 7, position 22."
}

was this client generated by an older openapi spec perhaps?

latompa avatar Sep 21 '22 00:09 latompa