-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for bigint #824
Comments
I wonder if the main part of the fix is as simple as changing this: to this: let value = item.format === 'int64' ? 'bigint' : 'number'; |
Hello @mkermani144, indeed should be only that |
@anymaniax But I still don't know if this should be the default behavior, or a configuration option. |
@mkermani144 with pleasure! |
Opened #829. |
Merged @mkermani144. thanks |
This results in a lot of frontend error can we please make this optional? |
sure @RichardLindhout can you do a pull request with that? |
@anymaniax would that work well? #841 |
Can you add a test where #829 works? When targeting react-query neither bigint parameters nor bigint responses work correctly. paths:
/big-param:
get:
parameters:
- in: query
name: aaa
schema:
type: integer
format: int64
paths:
/big-response:
get:
responses:
'200':
description: a
content:
application/json:
schema:
type: object
properties:
aaa:
type: integer
format: int64
|
What happens?
When we generate code using an open api spec which contains
int64
numbers, they are converted tonumber
s in the generated code.What were you expecting to happen?
The
int64
values should be converted tobigint
, as jsNumber.MAX_SAFE_INTEGER
cannot contain very large numbers (larger than 2^53).Anyway, I think this should be an option, not a default.
The text was updated successfully, but these errors were encountered: