-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
JavaScript heap out of memory an OpenAPI 2.0 document #1223
Comments
Spectral 5.5.x will come with many perf improvements as well as brand new JSON Path expression engine (hidden behind a flag for the time being). We have 5.5.0@beta published already, in case you are interested in trying it out live. |
Thanks @P0lip - I'd be happy to try out 5.5.x early versions or pre-release candidates and can throw them at the full OpenAPI documents we have (several are 3000-4000 lines) for more feedback on performance. I've also noticed some strange errors on properties defined with |
@DavidBiesack That would be awesome. You can already leverage the latest published beta to give it a try. |
...passing |
@nulltoken Unfortunately, using
node report file: report.20200615.091056.59247.0.001.json.txt |
@DavidBiesack |
@P0lip I use this ruleset:
|
Thanks a lot for all the details, really appreciate it. ResultsUSE_NIMMA=true /home/p0lip/Projects/Stoplight/spectral/binaries/spectral lint https://developer.apiture.com/docs/apis/accountApplications/v0.17.9/openapi.json
OpenAPI 2.0 (Swagger) detected
<REDACTED>
✖ xx problems (xx errors, x warning, x infos, x hints)
|
Thanks @P0lip - good to know there is a clean fix. (Can you perhaps delete the gory dirty laundry from the api document :-) ?) |
Not yet, but hopefully one day #98 😉 |
@P0lip I just meant delete all the error messages you pasted into the above comment :-) |
redacted. I'll let you know once a new release with the relevant fix is out. |
Just wanted to let you know that a new beta release is out. |
Thanks @P0lip - I can confirm that Spectral runs without the heap error on our source OpenAPI. Performance it still sluggish - it takes 54s to scan the source file. Using the |
Describe the bug
I ran:
spectral lint openapi.json
which resulted in a stack trace. The input OpenAPI 2.0 file is attached as
openapi.json.txt
(The OpenAPI contains some unused elements because it was extracted from a more complete API definition.)
Stack trace attached as
spectral-traceback.txt
Expected behavior
complete normally.
Environment (remove any that are not applicable):
Additional context
May be related to the size of the OpenAPI document. If I trim down some more of the content, eventually it works without running out of heap. But the source OpenAPI has many operations I left off of this, and other data.
The text was updated successfully, but these errors were encountered: