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

Add "useSingleRequestParameter" option to Rust client generator #6230

Merged
merged 3 commits into from
May 11, 2020

Conversation

wing328
Copy link
Member

@wing328 wing328 commented May 9, 2020

  • Add "useSingleRequestParameter" option to Rust client generator so that the method parameters will be grouped in a single struct
  • Tested locally and the result is good.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

cc @frol (2017/07) @farcaller (2017/08) @bjgill (2017/12) @richardwhiuk (2019/07) @paladinzh (2020/05)

@wing328 wing328 added this to the 5.0.0 milestone May 9, 2020
@wing328 wing328 merged commit d22bea2 into master May 11, 2020
@wing328 wing328 deleted the rust-single-param branch May 11, 2020 07:28
@wing328
Copy link
Member Author

wing328 commented May 20, 2020

OK. Will update those.

@wing328
Copy link
Member Author

wing328 commented May 20, 2020

Submitted #6381

cc @pbeyeler

@pbeyeler
Copy link

@wing328 Thank you!

@wing328
Copy link
Member Author

wing328 commented May 20, 2020

#6381 merged into master. Thanks for reporting the issue and suggesting the fix.

@wing328
Copy link
Member Author

wing328 commented May 27, 2020

@pbeyeler I've filed #6453 to export the struct. Please take a look when you've time.

@pbeyeler
Copy link

pbeyeler commented May 27, 2020

@wing328 Looks good to me.

However, I used the Stripe API spec (https://github.com/stripe/openapi/raw/master/openapi/spec3.yaml) for testing, which is quite complex. Trying to compile the generated code resulted in 1256 errors (Rust 1.43.0). This also happens with v4.3.1. Most of these errors boil down to the same 4 or 5 causes. If you have time, I'd really appreciate if you could fix these errors as well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants