Open mohamedelhabib opened 3 years ago
Yes. In the current implementation that's not going to work because before the validation starts the spec is dereferenced and in this case it ends up in an infinite recursion. I have to check if there's an easy way to solve this.
I just had a look at the JSON-schema validator that I use to validate the OpenAPI-description against the examples (which is ajv
) and they don't support circular references (see: https://github.com/ajv-validator/ajv/blob/HEAD/docs/security.md#circular-references-in-javascript-objects). So I'll have to put this on hold until they support it.
But the issue seem to be related to @apidevtools/json-schema-ref-parser
and not to ajv-validator
?
The only way I see to resolve this is to not dereference it in this case but instead keeping the reference pointer in the JSON-schema but then I'd have that circular reference that ajv
can't handle.
Hello
i'am using the openapi-examples-validator (4.2.0) to validate a openapi spec yaml that contains a recursive object. i got this error below a example
openapi
document