-
Notifications
You must be signed in to change notification settings - Fork 18
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: Json request body added for csharp #524
Conversation
@@ -19,6 +19,11 @@ | |||
} | |||
{{/vendorExtensions.x-required-param-exists}} | |||
|
|||
{{^vendorExtensions.x-is-json}} | |||
{{>options/GetParams}} |
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.
Test cases are failing because, GetParams is commented in ReadOptions but there is ovveride keyword in
https://github.com/twilio/twilio-csharp/blob/main/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.cs#L138
- Remove override using twilio-oai-generator
- Generate C# code using twilio-oai-generator and create a PR with main branch. Make sure there are no other changes then override removal.
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.
Created a PR for above mentioned:
twilio/twilio-csharp#699
You can review that and merge after reviewing.
{{#bodyParam}} | ||
contentType: EnumConstants.ContentTypeEnum.JSON, | ||
body: options.GetBody(), | ||
{{/bodyParam}} |
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.
in file CreateOptions.mustache
We are compariing using vendorExtension if request body has json or not. Here we are comparing with different variable.
Lets use only one way to compare.
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.
Is this change correct?
[twilio-oai-generator-php] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-ruby] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-java] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-python] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-node] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-go] Kudos, SonarCloud Quality Gate passed! |
contentType: EnumConstants.ContentTypeEnum.JSON, | ||
body: options.GetBody(), | ||
{{/bodyParam}} | ||
{{/vendorExtensions.x-is-json}} |
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
Fixes
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.