api icon indicating copy to clipboard operation
api copied to clipboard

Incorrect enum values in generated schema.

Open gitFurious opened this issue 7 years ago • 2 comments

The enum values in the generated schemas are currently string types but the API responds with integers.

The schema currently has strings:

"enum": [ "0", "1", "2", "4", "10", "254", "-1" ],

but should have integer values:

"enum": [ 0, 1, 2, 4, 10, 254, -1 ],

This causes issues with code-generation and model validation.

gitFurious avatar Sep 16 '17 16:09 gitFurious

Good finds! I'll take a look as soon as I can put my attention back on schema quality improvements.

vthornheart-bng avatar Sep 16 '17 17:09 vthornheart-bng

This threw me for a loop as well trying to generate a Rust SDK based on the OpenAPI document. I would be happy to submit a PR that addresses this if you'd be amenable. Thanks!

ahl avatar Sep 14 '23 18:09 ahl