-
Notifications
You must be signed in to change notification settings - Fork 22
chore: add context template #346
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
Conversation
| String paramName = path.substring(path.lastIndexOf("{") + 1, path.lastIndexOf("}")); | ||
| String paramName = ""; | ||
| if(path.lastIndexOf("{")!=-1){ | ||
| paramName = path.substring(path.lastIndexOf("{") + 1, path.lastIndexOf("}")); |
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.
use PathUtils.fetchLastElement(..)
| requiredPathParams.addAll(codegenOperation.pathParams); | ||
| codegenOperation.vendorExtensions = mapOperation(codegenOperation); | ||
|
|
||
| codegenOperation.vendorExtensions.put("hasRequiredFormParams", |
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.
these should be added under mapOperation(codegenOperation). Let's have one place where all codegenOperation vendorExtensions are added.
| private String apiName; | ||
| private String apiPath; | ||
| private String apiListPath; | ||
| private String apiContextPath; |
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.
Thoughts about extending ApiResources for PhpApiResources for properties specific to Php library? Since the plan is for all libraries to use ApiResources. @charan678 we did discuss on this today.
charan678
left a comment
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
| } | ||
|
|
||
| public static String fetchlastPathParam(final String path, final String beginningDelimiter, final String endingDelimiter) { | ||
| if(path.lastIndexOf("{")!=-1) |
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.
update this to beginningDelimiter
|
[twilio-oai-generator-node] Kudos, SonarCloud Quality Gate passed! |
|
[twilio-oai-generator-php] SonarCloud Quality Gate failed. |
|
[twilio-oai-generator-java] Kudos, SonarCloud Quality Gate passed! |
|
[twilio-oai-generator-go] Kudos, SonarCloud Quality Gate passed! |











Fixes
Checklist
make test-dockerpython examples/build_twilio_go.py path/to/twilio-oai/spec/yaml path/to/twilio-goand inspect the diffmake testintwilio-gotwilio-goIf you have questions, please create a GitHub Issue in this repository.