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

fix: Added support for query params in python #541

Merged
merged 8 commits into from
Nov 28, 2023

Conversation

tiwarishubham635
Copy link
Contributor

Fixes

Python did not support fetch and delete with query parameter. So added support for that.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • Run make test-docker
  • Verify affected language:
    • Generate twilio-go from our OpenAPI specification using the build_twilio_go.py using python examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-go and inspect the diff
    • Run make test in twilio-go
    • Create a pull request in twilio-go
    • Provide a link below to the pull request
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please create a GitHub Issue in this repository.

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}})
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

@AsabuHere AsabuHere left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

[twilio-oai-generator-ruby] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

[twilio-oai-generator-php] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

[twilio-oai-generator-java] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

[twilio-oai-generator-python] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

[twilio-oai-generator-node] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

[twilio-oai-generator-go] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@tiwarishubham635 tiwarishubham635 merged commit b63a8cb into main Nov 28, 2023
23 checks passed
@tiwarishubham635 tiwarishubham635 deleted the query_param_support branch November 28, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants