Skip to content

Conversation

@isha689
Copy link
Contributor

@isha689 isha689 commented Nov 29, 2022

Fixes

  • set context template
  • set list Constructor params
  • add @Property and @method annotations to context and list files
  • set correct arguments for CRUD function calls

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.

@isha689 isha689 requested a review from kridai November 29, 2022 13:56
String paramName = path.substring(path.lastIndexOf("{") + 1, path.lastIndexOf("}"));
String paramName = "";
if(path.lastIndexOf("{")!=-1){
paramName = path.substring(path.lastIndexOf("{") + 1, path.lastIndexOf("}"));
Copy link
Contributor

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",
Copy link
Contributor

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;
Copy link
Contributor

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 charan678 requested a review from kridai November 30, 2022 08:26
Copy link
Contributor

@charan678 charan678 left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

update this to beginningDelimiter

@sonarqubecloud
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

@sonarqubecloud
Copy link

[twilio-oai-generator-php] SonarCloud Quality Gate failed.    Quality Gate failed

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

2.2% 2.2% Coverage
1.1% 1.1% Duplication

@sonarqubecloud
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

@sonarqubecloud
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

@isha689 isha689 merged commit c0f638e into main Nov 30, 2022
@isha689 isha689 deleted the php_context_template branch November 30, 2022 09:02
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.

4 participants