Closed Marfyy closed 1 month ago
@Marfyy @melloware
The format
and its faker
function are managed below:
https://github.com/orval-labs/orval/blob/master/packages/mock/src/faker/constants.ts
Can we change it to be managed by constants instead of function?
good question @Marfyy can you take a look?
I fixed this by #1697
Status
READY
Description
Fix https://github.com/orval-labs/orval/issues/1472 If orval config uses override useBigInt, faker will be generated with faker.number.bigInt. I also added support for format double/float, to use faker.number.float. if useBigInt is not set, it will default back to faker.number.int
I appended the existing
tests/specifications/format.yaml
, and changed the name intests/configs/mock.config.ts
from useDates, to formats, to better reflect its content with the new test scenariosTodos
Steps to Test or Reproduce
Running locally against
tests/configs/mock.config.ts
, the config formats tests to generate the new number type/format combinations