apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.63k stars 2.14k forks source link

File size limits #373

Open zmorris opened 7 years ago

zmorris commented 7 years ago

Hi I wasn't sure which repo to open this under, but I am hitting file size limits on apiary.io. When I submit, it returns a generic parsing error and fails. I spoke with them over chat a bit but the issue is that the file is too large for the parser. Here are its stats:

1.2 MB (73 kB compressed zip) 22500 lines 123 endpoints

The biggest JSON response body is:

55 kB 1000 lines

The file is generated from a docblock to API Blueprint generator for Laravel that's part of the Dingo API framework that automatically documents all of our JSON API methods.

I'm curious how the parser could be failing, if it's a memory issue or something else. They did mention that perhaps the generated HTML was too large. For now I will probably break up the generated file into sections, or attempt to thin out any redundancy in the responses (perhaps by removing array elements beyond the 3rd one or something to that effect). Thanks for any help you can provide.

w-vi commented 7 years ago

Hi, well it is for sure that cli tools like drafter can handle such file but on apiary.io it is a service which has some limits like timeouts etc so I suppose you've hit one of those. It's hard to tell why you are hitting it. It might be that you have big number of warnings. Is it a private blueprint or public? I'd be able to help more when looking into the file.

pksunkara commented 7 years ago

From a previous conversation, the blueprint is really large with huge JSON payloads. There should be some improvement soon once we release the next major versions of the parser and fix the infrastructre based on that.

zmorris commented 7 years ago

Just wanted to let you know that the saving is working now as of this posting. Thanks for your efforts in fixing the issue!

For your notes - my file has 11 semantic issues, all of the type:

the resource 'x' is already defined

It's a private blueprint for a client so I can't share it, unfortunately. I had broken up the file into pieces before and it was working (although now I no longer have to). I'm not sure if it was a timeout issue, but as I recall it took about 20 seconds maybe to say that it failed.