json-schema-ref-parser icon indicating copy to clipboard operation
json-schema-ref-parser copied to clipboard

Immediately circular schema causes a maximum call stack trace exception

Open erunion opened this issue 2 years ago • 1 comments

Feeding this immediately circular API definition into the library will cause a "Maximum call stack size exceeded" exception within ref.js:

openapi: 3.0.0
info:
  version: 0.0.1
  title: Circular mishandling
servers:
  - url: https://httpbin.org
paths:
  "/anything":
    get:
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/responseSchema"
components:
  schemas:
    responseSchema:
      $ref: "#/components/schemas/responseSchema"
      description: This is a description.

erunion avatar Jun 28 '22 18:06 erunion

Have the same problem, any progress.

xiaoxuqi-ms avatar Feb 11 '23 09:02 xiaoxuqi-ms