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-server] Handle headers correctly #549

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

bjgill
Copy link
Contributor

@bjgill bjgill commented Jul 12, 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.1.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @farcaller @frol

Description of the PR

We were previously relying on some incorrect behaviour of the old swagger-codegen mustache engine. See #307 (comment) for a description of the error.

This PR switches some (incorrect) usage of headers over to use hasHeaders instead.

I've not done any specific testing. However, given that the sample is unchanged (apart from the test that we can now re-enable), I'm happy that this is not going to regress anything.

We were previously relying on some incorrect behaviour of the old
swagger-codegen mustache engine.
@bjgill
Copy link
Contributor Author

bjgill commented Jul 12, 2018

Shippable failure seems unrelated to this PR (E: Failed to fetch http://deb.opera.com/opera/dists/stable/non-free/binary-amd64/Packages 503 Connection timed out [IP: 151.101.2.202 80])

@wing328 - thanks for pointing me in the correct direction in #307 (comment). Once this PR has gone in, the rust-server generator in openapi-generator will be fully feature-compatible with the version in swagger-codegen (modulo the 'file' problem discussed elsewhere).

@wing328
Copy link
Member

wing328 commented Jul 12, 2018

I've restarted the Shippable job but it times out.

Given that rust-server is tested in the Travis job, I'm ok to merge this PR as the change looks good to me.

@wing328 wing328 merged commit 6c14b42 into OpenAPITools:master Jul 12, 2018
@bjgill bjgill deleted the fix-header-handling branch July 16, 2018 09:03
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
We were previously relying on some incorrect behaviour of the old
swagger-codegen mustache engine.
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

2 participants