Describe the bug
When the openapi specification grows and has a huge list that we need to distinguish between, I got the error Ajv error: Maximum call stack size exceeded while executing respect.
To Reproduce
- Using provided example run mock server and then run
redocly respect openapi.arazzo.yaml
- Receive
Ajv error: Maximum call stack size exceeded
Expected behavior
Respect command executes successfully.
Logs

OpenAPI description
Provided archive.
Redocly version(s)
2.20.2
Node.js version(s)
24
OS, environment
macOs
Additional context
I investigated a little bit and when i comment discriminator: true in Ajv instance inside the file: packages/respect-core/src/modules/flow-runner/schema/schema-checker.ts i didn't receive an error.
One of our customer reported, that the error occurs when the number of enum values exceeds 126.
call-stack-repro.zip
Describe the bug
When the openapi specification grows and has a huge list that we need to distinguish between, I got the error
Ajv error: Maximum call stack size exceededwhile executingrespect.To Reproduce
redocly respect openapi.arazzo.yamlAjv error: Maximum call stack size exceededExpected behavior
Respect command executes successfully.
Logs

OpenAPI description
Provided archive.
Redocly version(s)
2.20.2
Node.js version(s)
24
OS, environment
macOs
Additional context
I investigated a little bit and when i comment
discriminator: truein Ajv instance inside the file:packages/respect-core/src/modules/flow-runner/schema/schema-checker.tsi didn't receive an error.One of our customer reported, that the error occurs when the number of enum values exceeds 126.
call-stack-repro.zip