[DOCS] OpenAPI Spec contains invalid datatypes #781
Unanswered
TorbenCapiau
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I've been working with the Etsy v3 API for over a year now as part of a larger C# project and for the most part I like it.
I have however noticed that the OpenAPI spec contains invalid data types, more specifically IDs are usually set as "integers" (for example: transaction_id).
This means that when I use a code generator to create model classes for my C# program, the ID properties are created as an Int32, however Etsy uses at least Int64 values for such IDs. I've solved this by manually replacing
int
withlong
in my model classes, but obviously this isn't a great solution as this means I would have to perform this manual task each time an API update is released.This can be easily prevented by assigning correct data types in the OpenAPI spec. More information is available at https://swagger.io/docs/specification/data-models/data-types/#numbers
In short, instead of just the current
"type": "integer"
, another key value pair should be added:"format": "int64"
I hope this is the right place to report this problem. I wasn't able to open an issue directly.
Many thanks in advance. I hope to see this API develop further with more features.
Beta Was this translation helpful? Give feedback.
All reactions