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 "servers" support to Ruby API client #1280

Merged
merged 6 commits into from
Oct 22, 2018
Merged

Add "servers" support to Ruby API client #1280

merged 6 commits into from
Oct 22, 2018

Conversation

wing328
Copy link
Member

@wing328 wing328 commented Oct 20, 2018

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 and ./bin/security/{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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.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

  • allows the Ruby API client to retrieve all server URLs defined in the spec
  • fix basePath when the URL contains variables

cc @cliffano (2017/07) @zlx (2017/09)

cc @OpenAPITools/generator-core-team (https://github.com/OpenAPITools/openapi-generator/pull/1280/files#diff-9f39023184e570db9adc3829e67cb2e0R171)

@wing328 wing328 added this to the 3.3.2 milestone Oct 20, 2018
@wing328 wing328 changed the title Add "servers" support to Ruby API client [WIP] Add "servers" support to Ruby API client Oct 20, 2018
@wing328 wing328 changed the title [WIP] Add "servers" support to Ruby API client Add "servers" support to Ruby API client Oct 21, 2018
@jimschubert
Copy link
Member

I did a quick look over this PR, and it looks good. It's not clear to me where the content-type fix in the generated output comes from. I'm assuming the sample either wasn't generated since the fix, or the addition of the new working servers implementation makes content-types available as expected.

@wing328
Copy link
Member Author

wing328 commented Oct 22, 2018

@wing328 thanks for the review. The additional content-type is due to the use of OAS v3 spec (which supports multiple servers with variables):

Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

Copy link
Contributor

@ackintosh ackintosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@wing328 wing328 merged commit a55533c into master Oct 22, 2018
@wing328 wing328 deleted the ruby_server_url branch October 22, 2018 10:41
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* update ruby samples with OAS3 spec

* add server support to ruby api client

* minor format change

* minor format fix, skip form models

* better exception and add test for invaid value

* remove exception test code
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.

None yet

3 participants