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

Define content type if and only if the body is not empty #9910

Merged
merged 4 commits into from
Sep 25, 2021

Conversation

romanblack1
Copy link
Contributor

Addresses the same issue (#8116) as the PR (#9766), but in the ruby client.

@wing328 wing328 changed the title define content type iff the body is not empty, ruby client Define content type if and only if the body is not empty Jul 7, 2021
@wing328
Copy link
Member

wing328 commented Jul 7, 2021

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328
Copy link
Member

wing328 commented Jul 7, 2021

cc @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02)

@wing328 wing328 added this to the 5.2.0 milestone Jul 7, 2021
@romanblack1 romanblack1 closed this Jul 8, 2021
@romanblack1 romanblack1 reopened this Jul 8, 2021
@romanblack1 romanblack1 closed this Jul 9, 2021
@romanblack1 romanblack1 reopened this Jul 9, 2021
@romanblack1 romanblack1 reopened this Jul 12, 2021
@wing328 wing328 modified the milestones: 5.2.0, 5.2.1 Jul 13, 2021
@wing328
Copy link
Member

wing328 commented Jul 19, 2021

Travis CI failed with the following errors:

Bundled gems are installed into `./vendor/bundle`

An error occurred while loading spec_helper.
Failure/Error: require 'petstore/api/another_fake_api'

SyntaxError:
  /home/travis/build/OpenAPITools/openapi-generator/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb:89: syntax error, unexpected end-of-input, expecting keyword_end
# ./lib/petstore.rb:66:in `require'
# ./lib/petstore.rb:66:in `<top (required)>'
# ./spec/spec_helper.rb:14:in `require'
# ./spec/spec_helper.rb:14:in `<top (required)>'
No examples found.


Finished in 0.00003 seconds (files took 0.23442 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (bundle-test) on project RubyPetstoreFaradayClientTests: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (bundle-test) on project RubyPetstoreFaradayClientTests: Command execution failed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

Can you please take a look?

Ref: https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds/232524856

@romanblack1
Copy link
Contributor Author

We believe we have fixed the bug that causes the error you've mentioned, but it looks like the build is still failing due to some unrelated reason. Can you take a look?

@wing328 wing328 modified the milestones: 5.2.1, 5.3.0 Aug 17, 2021
@wing328
Copy link
Member

wing328 commented Sep 25, 2021

Looks like we need to update the tests as well. I'll do it after merging this PR.

Failures:
  1) Petstore::ApiClient#select_header_content_type works
     Failure/Error: expect(api_client.select_header_content_type(nil)).to eq('application/json')
       expected: "application/json"
            got: nil
       (compared using ==)
     # ./spec/api_client_spec.rb:162:in `block (3 levels) in <top (required)>'
Finished in 1.04 seconds (files took 0.26268 seconds to load)
258 examples, 1 failure, 3 pending
Failed examples:
rspec ./spec/api_client_spec.rb:161 # Petstore::ApiClient#select_header_content_type works

Thanks again for the enhancement.

@wing328 wing328 merged commit 622a936 into OpenAPITools:master Sep 25, 2021
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