Open broccolihighkicks opened 4 years ago
Please try the latest master or 5.0.0-beta2 to see if you still experience the same issue.
Same errors with v5. Should this be fixed in that version?
I don't understand how the generator can output code that does not compile. Isn't the promise of machine readable specifications that there will be no errors in converting a spec to client code (that a human may make)?
Where should I be looking if I wanted to fix this? The generator framework or the HTML templates?
FWIW I've hit nearly identical errors with the OpenAPI spec I've tried with 5.0.0 and latest master both, for example:
error: cannot find type `OneOfnumberstringstring` in module `crate::models`
I am thinking of merging my fix, but it needs work.
If anyone is interested in generating Rust clients let me know.
If you tell me how to build it to try it out I'm happy to try it against some specs.
@broccolihighkicks I am also interested in the compilable Rust client library for stripe api.
Gained some experience on working with mustache templates so far. Will probably dive into Java code next. The unnamed schemas for request bodies/parameters/responses is pain in the *** Especially because how openapi-generator approaches it. Having some documentation on how the struct names are generated and how the generated names relate to concrete operation would be awesome. For now I will have to parse the generated code with rust_ast and so on, to get the type names of api function's parameters and/or return values.
Hello,
The Stripe open api v3 spec does not compile with Rust code gen:
Steps to reproduce:
openapi-generator generate -i ./openapi/spec3.json -g rust -o ./openapi-generator/rust-spec-3
cd ./openapi-generator/rust-spec-3
cargo build
cargo build
errors:Versions
openapi-generator version
4.3.1
cargo version
cargo 1.46.0 (149022b1d 2020-07-17)
https://github.com/stripe/openapi
Commit: fec5f44b