Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripVendorExtensions recursion #145

Open
JProgrammer opened this issue Oct 15, 2018 · 1 comment
Open

stripVendorExtensions recursion #145

JProgrammer opened this issue Oct 15, 2018 · 1 comment

Comments

@JProgrammer
Copy link

Hi with the new stripVendorExtensions on api docs the code does not take into account recursive structures which will result in an error

    at RegExp.[Symbol.match] (<anonymous>)
    at String.match (native)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:50:16)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)
    at stripVendorExtensions (/Users/admj012/projects/bablProducts/node_modules/hapi-openapi/lib/index.js:51:22)

Here is a minimal openapi spec to replicate the issue

swagger: '2.0'
info:
  title: Recursion
  version: 1.0.0
paths:
  /recursion:
    get:
      responses:
        '200':
          description: 200 OK
          schema:
            $ref: '#/definitions/Recursion'
definitions:
  Recursion:
    type: object
    properties:
      healthStatus:
        $ref: '#/definitions/Recursion'
tags: []
@tlivings
Copy link
Contributor

Hmm, that function should not be following references at all. Will double check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants