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

Resolving large specs takes very long / crashes #2532

Open
kingjan1999 opened this issue May 8, 2022 · 0 comments
Open

Resolving large specs takes very long / crashes #2532

kingjan1999 opened this issue May 8, 2022 · 0 comments

Comments

@kingjan1999
Copy link

Q&A (please complete the following information)

  • OS: Ubuntu 22.04
  • Environment: Node 16.13.2
  • Method of installation: npm
  • Swagger-Client version: 3.18.5
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Swagger/OpenAPI definition: Stripe

Swagger-Client usage:

const SwaggerClient = require('swagger-client');

SwaggerClient.resolve({url: 'https://github.com/stripe/openapi/raw/master/openapi/spec3.json'})

Describe the bug you're encountering

Running the above script takes very long and and uses one CPU core non-stop 100%. I was too impatient to wait until it might complete or node.js fails, so I cancelled the process after 27 minutes. A user of my downstream library reported that the process crashes after about one hour.

To reproduce...

Steps to reproduce the behavior:

  1. Run the script above (e.g. node index.js)

Expected behavior

The script terminates successfully after a reasonable period of time.

Additional context or thoughts

While I think it is acceptable that resolving very large / complex specs takes longer, I would think that it should be faster than it is at the moment. Doing the same using the Java swagger-parser only takes a few seconds for the same spec.

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

1 participant