Description
When mocking a complex third-party API schema (dots API), we're encountering a "Maximum call stack size exceeded" error. The package appears to enter an infinite recursion loop when attempting to generate mock data based on the schema structure. This is causing our application to crash when trying to load specific routes.
Reproduction steps
- Use fromOpenApi(spec) with the open api schema attached
- Hit the "/v2/transfers/{transfer_id}" endpoint
- Observe the application crash with "RangeError: Maximum call stack size exceeded"
This is the schema:
https://github.com/Send-Dots/dots-docs-v2/blob/master/docs/v2.yaml
I have to convert it to json from the yaml file.
dots.spec.json
Expected behavior
Limit recursion depth by default / with a configuration.
Initial assessment
It's probably a problem with the schema, but that's not something that I have control over since it's a third party api. I feel like this is the expectation for @mswjs/source users.
Reactions are currently unavailable
Description
When mocking a complex third-party API schema (dots API), we're encountering a "Maximum call stack size exceeded" error. The package appears to enter an infinite recursion loop when attempting to generate mock data based on the schema structure. This is causing our application to crash when trying to load specific routes.
Reproduction steps
This is the schema:
https://github.com/Send-Dots/dots-docs-v2/blob/master/docs/v2.yaml
I have to convert it to json from the yaml file.
dots.spec.json
Expected behavior
Limit recursion depth by default / with a configuration.
Initial assessment
It's probably a problem with the schema, but that's not something that I have control over since it's a third party api. I feel like this is the expectation for @mswjs/source users.