Hilzu/express-openapi-validate

oas with circular reference

Opened this issue · 0 comments

Hello, i have a problem:

my openapi spec has circular reference, so i am getting Maximum call stack size exceeded because of it in walkSchema function of schema-utils.js.

Is there a way to make express-openapi-validate work with oas with circular reference?

i have something like this:

Characteristic:
  type: object
  description: Provides the value of a given characteristic
  required:
    - name
  properties:
    id:
      type: string
      description: Unique identifier of the characteristic
    name:
      type: string
      description: Name of the characteristic
    nested:
      type: array
      items:
        $ref: '#/components/schemas/Characteristics'


Characteristics:
  type: array
  items:
    $ref: '#/components/schemas/Characteristic'