-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: Added support for query params in python #541
Conversation
payload = self._version.create(method='POST', uri=self._uri, {{#hasParams}}data=data,{{/hasParams}}{{#allParams}}{{#if isFormParam}}{{else}} headers=headers{{/if}}{{/allParams}}) | ||
{{#allParams}}{{#isHeaderParam}}headers = values.of({'{{{baseName}}}': {{paramName}}, }){{/isHeaderParam}}{{/allParams}} | ||
{{#allParams}}{{#isQueryParam}}params = values.of({'{{{baseName}}}': {{paramName}}, }){{/isQueryParam}}{{/allParams}} | ||
payload = self._version.create(method='POST', uri=self._uri, {{#hasParams}}data=data,{{/hasParams}}{{#allParams}}{{#if isHeaderParam}} headers=headers{{/if}}{{#if isQueryParam}}, params=params{{/if}}{{/allParams}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if params is added solely for query parameters, can you rename this to queryParams itself? There are other params as well lik path params and all, renaming this will make the code mode readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this edit will not only support query params but all other params as well. Thus it is added this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
f65ce30
to
c7b3ff8
Compare
[twilio-oai-generator-ruby] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-php] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-java] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-python] Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
[twilio-oai-generator-node] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-go] Kudos, SonarCloud Quality Gate passed! |
Fixes
Python did not support fetch and delete with query parameter. So added support for that.
Checklist
make test-docker
python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go
and inspect the diffmake test
intwilio-go
twilio-go
If you have questions, please create a GitHub Issue in this repository.