Azure / openapi-diff

Command line tool to detect breaking changes between two openapi specifications
MIT License
256 stars 36 forks source link

Allowing circular references #274

Open alexandreczg opened 1 year ago

alexandreczg commented 1 year ago

Is there a way to generate the report allowing for circular dependencies on the parameters?

OpenApiDiffErrorImpl [VError]: ReferenceError: Circular $ref pointer found at /builds/#/components/schemas/Content/properties/children/items
    at /usr/local/lib/node_modules/openapi-diff/dist/openapi-diff/spec-differ/diff-finder/json-schema-diff.js:27:15
    at Generator.throw (<anonymous>)
    at rejected (/usr/local/lib/node_modules/openapi-diff/dist/openapi-diff/spec-differ/diff-finder/json-schema-diff.js:6:65) {
  jse_shortmsg: 'ReferenceError: Circular $ref pointer found at /builds/#/components/schemas/Content/properties/children/items',
  jse_info: {},
  code: 'OPENAPI_DIFF_DIFF_ERROR'
}

Thank you!

afonsojramos commented 2 months ago

@mikeharder is this planned in any way? I can try and give a hand here.

mikeharder commented 2 months ago

@afonsojramos: If you submit a pull request (with unit tests), we will review it, and likely merge it, if it solves a real problem with no downside.

afonsojramos commented 2 months ago

@mikeharder Sounds good, any guiding advice as to where to look? Have opened a few PRs btw 👀