-
Notifications
You must be signed in to change notification settings - Fork 16
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: resolve lint issues #434
base: main
Are you sure you want to change the base?
Conversation
[twilio-oai-generator-ruby] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-python] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-java] SonarCloud Quality Gate failed. |
[twilio-oai-generator-node] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-php] Kudos, SonarCloud Quality Gate passed! |
[twilio-oai-generator-go] Kudos, SonarCloud Quality Gate passed! |
String path = "/2010-04-01/Accounts.json"; | ||
String path = String.format("%s", "/2010-04-01/Accounts.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.
Why this change? Is there an example that requires the format call?
{{#isString}} | ||
path = path.replace("{"+"{{#lambda.titlecase}}{{baseName}}{{/lambda.titlecase}}"+"}", this.{{paramName}}); | ||
{{/isString}} | ||
{{^isString}} | ||
path = path.replace("{"+"{{#lambda.titlecase}}{{baseName}}{{/lambda.titlecase}}"+"}", this.{{paramName}}.toString()); | ||
{{/isString}} |
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.
Cleaner to wrap toString
with isString
check, than duplicate the line.
{{/vendorExtensions.x-is-account-sid}} | ||
{{/allParams}} | ||
{{#requiredParams}} | ||
{{#vendorExtensions.x-is-phone-number-format}} | ||
path = path.replace("{"+"{{#lambda.titlecase}}{{baseName}}{{/lambda.titlecase}}"+"}", this.{{paramName}}.encode("utf-8")); | ||
{{/vendorExtensions.x-is-phone-number-format}} | ||
{{^vendorExtensions.x-is-phone-number-format}} | ||
{{#isString}} | ||
path = path.replace("{"+"{{#lambda.titlecase}}{{baseName}}{{/lambda.titlecase}}"+"}", this.{{paramName}}); |
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.
Same as above.
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.