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

Stack overflow while generating client from large schema #12

Open
sportfloh opened this issue Aug 29, 2023 · 4 comments
Open

Stack overflow while generating client from large schema #12

sportfloh opened this issue Aug 29, 2023 · 4 comments

Comments

@sportfloh
Copy link

sportfloh commented Aug 29, 2023

Hi,
I tried to generate a client for the vSphere Web Services API and I got a stack overflow error:

❯ libninja gen -l rust -g sportfloh/vsphere -o vsphere vsphere ../vi_json_openapi_specification_v8_0_1_0.yaml
...
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[1]    240 abort      libninja gen -l rust -g sportfloh/vsphere -o vsphere vsphere

vSphere Web Services API OpenAPI Schema

Cheers

@kurtbuilds
Copy link
Owner

Thank you! Can you share the exact link to the yaml? The link points to a huge documentation site, and I can't find the YAML document therein.

@kurtbuilds
Copy link
Owner

Realistically not sure when I'll have time to prioritize this. Happy to answer Qs if you investigate the problem.

@pscott31
Copy link

pscott31 commented Nov 27, 2023

I got this when the the schema was potentially recursive, e.g with a parameter like

struct Item{
   name: String
   related_item: Option<Item>
}

And it was when generating the example that it overflowed (you can kinda see why ;)

Anyway I have a PR with a fix that WorksForMe(tm) or you might find that disabling examples does it for you

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

3 participants