anymaniax / orval

orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
https://orval.dev
MIT License
2.56k stars 284 forks source link

mock does not generate correct bigint type #1472

Open thegenius opened 2 weeks ago

thegenius commented 2 weeks ago

when field type is bigint, mock will use faker.number.int() to generate number value, which cause error.

thegenius commented 2 weeks ago

and it will be better to generate mock in a separated file

melloware commented 2 weeks ago

PR is welcome i would think this would be easy fix for bigint

thegenius commented 2 weeks ago

As I have read the source code of the mock package, it's not so hard to fix this. But it's a big problem to create a correct PR, but there is no tests with mock, I can't find any test code for mock, so if it be possible to create a basic tests suite. And after we get test suite, then we can create correct PR to help this project.