express-openapi-validate icon indicating copy to clipboard operation
express-openapi-validate copied to clipboard

oas with circular reference

Open kshavva opened this issue 3 years ago • 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'

kshavva avatar Sep 09 '22 13:09 kshavva