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

[rust] Make it easier to test rust client generator #3543

Merged
merged 8 commits into from
Sep 27, 2019

Conversation

bjgill
Copy link
Contributor

@bjgill bjgill commented Aug 2, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @frol @farcaller @richardwhiuk

Description of the PR

As we discovered in #3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.

Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested.

@auto-labeler
Copy link

auto-labeler bot commented Aug 2, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@bjgill
Copy link
Contributor Author

bjgill commented Aug 2, 2019

Note for reviewers: I'd suggest reviewing this by commits, rather than trying to do the whole thing together. The bulk of the changes are the four new samples, which are largely uninteresting...

@bjgill bjgill changed the title [rust] Add more testing of the rust client generator [rust] Make it easier to test rust client generator Aug 2, 2019
bin/rust-petstore.sh Outdated Show resolved Hide resolved
@bjgill
Copy link
Contributor Author

bjgill commented Sep 12, 2019

OK. No further responses. Unless anyone objects, I'll rebase and merge this next week, then.

They are now in one cargo workspace, so a single `cargo check` will now check all rust samples
To catch the problem found in OpenAPITools#3463 if it is ever encountered again
Previously, we might not have noticed if an early generation failed, but the final one succeeded.
@bjgill
Copy link
Contributor Author

bjgill commented Sep 25, 2019

OK. I've rebased cleanly onto master. Assuming this builds fine, I'll merge.

@bjgill bjgill merged commit eb793ae into OpenAPITools:master Sep 27, 2019
@bjgill bjgill deleted the rust-tests branch September 27, 2019 15:27
jimschubert added a commit that referenced this pull request Sep 30, 2019
* master: (207 commits)
  Add missing enum processing in C++ codegen, already present for Qt5 (#3986)
  [C++] [Pistache] Removed deprecated warnings (#3985)
  [C++][Pistache] Simplified model template (#3417)
  add go oas3 petstore to ensure up-to-date (#3979)
  replace gitter with slack in the doc (#3977)
  Fix wrong variable name in LessThan and LessThanOrEqual asserts (#3971)
  #3957 - Removed hardcoded baseUrl (#3964)
  Regenerate go openapi3 samples (#3975)
  [rust] Make it easier to test rust client generator (#3543)
  Fix issue3635 (#3948)
  add gradle repository (#3867)
  [java] allow to use setArtifactVersion() programmatically (#3907)
  Add a link to DevRelCon SF 2019 (#3961)
  Add a link to a medium blog post (#3960)
  update maven-compiler-plugin version (#3956)
  fix generateAliasAsModels in default generator (#3951)
  Implement BigDecimal to Decimal in swift4 for currency data as type=string format=number (#3910)
  Add F# Functions server generator (#3933)
  [python-experimental] generate model if type != object if enums/validations exist (#2757)
  [scala] add [date-time] field to codegen unit test (#3939)
  ...
Jesse0Michael pushed a commit to Jesse0Michael/openapi-generator that referenced this pull request Oct 3, 2019
As we discovered in OpenAPITools#3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.

Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested
jimschubert added a commit that referenced this pull request Oct 4, 2019
* master: (110 commits)
  [golang] Regenerate all go samples  (#3988)
  Better tests for string (number) (#3953)
  Add missing enum processing in C++ codegen, already present for Qt5 (#3986)
  [C++] [Pistache] Removed deprecated warnings (#3985)
  [C++][Pistache] Simplified model template (#3417)
  add go oas3 petstore to ensure up-to-date (#3979)
  replace gitter with slack in the doc (#3977)
  Fix wrong variable name in LessThan and LessThanOrEqual asserts (#3971)
  #3957 - Removed hardcoded baseUrl (#3964)
  Regenerate go openapi3 samples (#3975)
  [rust] Make it easier to test rust client generator (#3543)
  Fix issue3635 (#3948)
  add gradle repository (#3867)
  [java] allow to use setArtifactVersion() programmatically (#3907)
  Add a link to DevRelCon SF 2019 (#3961)
  Add a link to a medium blog post (#3960)
  update maven-compiler-plugin version (#3956)
  fix generateAliasAsModels in default generator (#3951)
  Implement BigDecimal to Decimal in swift4 for currency data as type=string format=number (#3910)
  Add F# Functions server generator (#3933)
  ...
@wing328 wing328 added this to the 4.2.0 milestone Oct 30, 2019
@wing328
Copy link
Member

wing328 commented Oct 31, 2019

@bjgill thanks for the PR, which has been included in v4.2.0 release: https://twitter.com/oas_generator/status/1189824932345069569

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.

3 participants