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

Panic while generating BNA API #877

Closed
rgreinho opened this issue Aug 2, 2024 · 4 comments
Closed

Panic while generating BNA API #877

rgreinho opened this issue Aug 2, 2024 · 4 comments

Comments

@rgreinho
Copy link

rgreinho commented Aug 2, 2024

I am trying to generate a client for the BNA API, and I am getting a very generic error which does not help me spotting the value causing the issue.

$ RUST_BACKTRACE=1 cargo progenitor -i openapi.yaml -o bnaclient -n bnaclient -v 1.0.0 --interface builder

gen fail: TypeError(InvalidValue)
Error: generation experienced errors

Stack backtrace:
   0: std::backtrace::Backtrace::create
   1: anyhow::error::<impl anyhow::Error>::msg
   2: cargo_progenitor::main
   3: std::sys_common::backtrace::__rust_begin_short_backtrace
   4: std::rt::lang_start::{{closure}}
   5: std::rt::lang_start_internal
   6: _main

The file does not generate any error in the Swagger editor.

@dunxen
Copy link

dunxen commented Oct 21, 2024

I get the same error in #955, and I'm not sure if they might miraculously be related.

@mkatychev
Copy link

mkatychev commented Oct 21, 2024

Running with RUST_LOG=debug will give more information here, this gave an easy fix here: PeopleForBikes/bna-api#146 with this commit: PeopleForBikes/bna-api@438bca0

@dunxen
Copy link

dunxen commented Oct 21, 2024

Ah, didn't know the logging was set up. Should have tried that for my issue. Thanks!

@rgreinho
Copy link
Author

rgreinho commented Nov 2, 2024

We got it to work by tweaking the openapi.yaml file 👍

@rgreinho rgreinho closed this as completed Nov 2, 2024
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