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

[R] Alternate PR for serialization fixes along with WithHttpInfo method enhancement #3099

Merged
merged 13 commits into from
Jun 21, 2019
Merged

[R] Alternate PR for serialization fixes along with WithHttpInfo method enhancement #3099

merged 13 commits into from
Jun 21, 2019

Conversation

Ramanth
Copy link
Contributor

@Ramanth Ramanth commented Jun 5, 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.

Description of the PR

This is the alternative of this PR
Along with the addition WithHttpInfo method for the http operation methods.

@wing328 This PR has the changes as discussed.

@auto-labeler
Copy link

auto-labeler bot commented Jun 5, 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.

@Ramanth
Copy link
Contributor Author

Ramanth commented Jun 10, 2019

@wing328 finished making the required changes, considering the backward compatibility as discussed. Please take a look and merge accordingly. Thanks

@wing328
Copy link
Member

wing328 commented Jun 18, 2019

I got an error when testing with NamSor R SDK (pr_3099 branch):

Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  1: api.instance$GenderGeoBatch(batch.first.last.name.geo.in = var.batch.first.last.name.geo.in) at testthat/test_personal_api.R:177
  2: self$GenderGeoBatchWithHttpInfo(batch.first.last.name.geo.in = NULL, ...)
  
  ── 2. Error: OriginBatch (@test_personal_api.R#226)  ───────────────────────────
  attempt to apply non-function
  1: api.instance$GenderBatch(batch.first.last.name.in = var.batch.first.last.name.in) at testthat/test_personal_api.R:226
  2: self$GenderBatchWithHttpInfo(batch.first.last.name.in = NULL, ...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 26 SKIPPED: 397 WARNINGS: 0 FAILED: 2
  1. Error: GenderGeoBatch (@test_personal_api.R#177) 
  2. Error: OriginBatch (@test_personal_api.R#226) 
  
  Error: testthat unit tests failed
  Execution halted
* checking PDF version of manual ... OK
* DONE

Ref: https://travis-ci.org/namsor/namsor-r-sdk2/builds/547138705

@wing328
Copy link
Member

wing328 commented Jun 19, 2019

Also for the following:

      } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
        ApiResponse$new("API client error", resp)
      } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
        ApiResponse$new("API server error", resp)
      }

Shall we use stop instead as 4xx, 5xx imply errors/exceptions? (that's what we do in other API clients, which may even have an ApiException class)

@Ramanth
Copy link
Contributor Author

Ramanth commented Jun 19, 2019

@wing328 i have those changes implementing the ApiException (and also documentation generation) ready to be raised in another PR.
just kept them hold as once this PR gets merged ill raise those changes as well.

@wing328
Copy link
Member

wing328 commented Jun 21, 2019

Tested via NamSor R SDK and the result is good: https://travis-ci.org/namsor/namsor-r-sdk2/builds/548573316

@wing328 wing328 added this to the 4.0.3 milestone Jun 21, 2019
@wing328 wing328 merged commit 46c18ad into OpenAPITools:master Jun 21, 2019
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Jun 24, 2019
* master: (25 commits)
  Add #send to ruby reserved word list (OpenAPITools#3146)
  Merge java8 doc for spring (OpenAPITools#3122)
  added api key authentication to aspnetcore 2.1 (OpenAPITools#3089)
  Add "yue9944882" to Perl technical committee (OpenAPITools#3194)
  [csharp-netcore]: Adding http response details in api_docs and making example snippet compilable (OpenAPITools#3128)
  generate travis configuration (OpenAPITools#3193)
  Perl: Basic bearer auth support (OpenAPITools#3192)
  [R] feat(r) : Alternate PR for serialization fixes along with WithHttpInfo method enhancement (OpenAPITools#3099)
  improve release checkout script (OpenAPITools#3184)
  Prepare 4.0.3-SNAPSHOT  (OpenAPITools#3185)
  4.0.2 release (OpenAPITools#3181)
  Fix rubocop obsolescence (OpenAPITools#3175)
  Add Fuse to the company list (OpenAPITools#3164)
  Idiomatic Rust returns for Error conversions (OpenAPITools#2812)
  Add API timeout handling (OpenAPITools#3078)
  Import inner items for map (OpenAPITools#3123)
  update core team in pom.xml (OpenAPITools#3126)
  [gradle] Document consuming via gradle plugin portal (OpenAPITools#3125)
  Bump up babel-cli version to fix security alert (OpenAPITools#3121)
  [C++] [cpprestsdk] Add examples and test for cpprestsdk (OpenAPITools#3109)
  ...
@wing328 wing328 changed the title [R] feat(r) : Alternate PR for serialization fixes along with WithHttpInfo method enhancement [R] Alternate PR for serialization fixes along with WithHttpInfo method enhancement Jul 9, 2019
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