Skip to content

fix: use "number" instead of "double" for format#106

Open
eseidel wants to merge 1 commit intoSpaceTradersAPI:mainfrom
eseidel:main
Open

fix: use "number" instead of "double" for format#106
eseidel wants to merge 1 commit intoSpaceTradersAPI:mainfrom
eseidel:main

Conversation

@eseidel
Copy link
Contributor

@eseidel eseidel commented Apr 17, 2025

The server sends down 'condition: 1' even though the format is listed as 'double' which at least the Dart OpenAPI generator treats very strictly as a floating point which '1' does not parse as (it parses as an integer). OpenAPI does seem to have distinct types for "integer", "number" and "double", since the server isn't always including the dot, I guess this type should be "number". At least that would fix the current OpenAPI dart generator. If you believe the open api generator is at fault, I'm open to fixing that instead.

The server sends down 'condition: 1' even though the format is
listed as 'double' which at least the Dart OpenAPI generator treats
very strictly as a floating point which '1' does not parse as (it parses
as an integer).  OpenAPI does seem to have distinct types for
"integer", "number" and "double", since the server isn't always including
the dot, I guess this type should be "number".  At least that would
fix the current OpenAPI dart generator. If you believe the open api
generator is at fault, I'm open to fixing that instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant