openapistack / openapi-backend

Build, Validate, Route, Authenticate and Mock using OpenAPI

Home Page:https://openapistack.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recursive schema: Maximum call stack size exceeded

gunnartorfis opened this issue · comments

I'm using this library for mocking in a React Native application along with MSW.

When using the openapi-backend on operations that don't return recursive response schemas, the library works flawlessly. However, when I'm mocking an endpoint that returns recursive data, I get the error RangeError: Maximum call stack size exceeded.

Is there some configuration I need to set to limit the mocking? Like with x-json-schema-faker, we have the maxItems property set to 2:

openapi: 3.0.2
x-json-schema-faker:
  maxItems: 2