-
Notifications
You must be signed in to change notification settings - Fork 97
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
Feature/grpc #2369
Feature/grpc #2369
Conversation
removed duplicate function
|
||
private static final Logger logger = LogManager.getLogger(GRPCAPI.class); | ||
private final List<Filter> filters = new ArrayList<>(); | ||
private APIConfig apiConfig; |
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.
private APIConfig apiConfig; | |
private APIConfig apiConfig; | |
|
||
|
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.
You could remove the extra spaces here and there
@@ -280,6 +280,14 @@ public class APIClient { | |||
return fullBasePath; | |||
} | |||
|
|||
isolated function returnFullGRPCBasePath(string basePath, string 'version) returns string { | |||
string fullBasePath = basePath; | |||
if (!string:endsWith(basePath, 'version)) { |
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.
if (!string:endsWith(basePath, 'version)) { | |
if !string:endsWith(basePath, 'version) { |
@@ -448,6 +456,19 @@ public class APIClient { | |||
sandboxRoutes.push(gqlRoute.metadata.name); | |||
} | |||
} | |||
} else if apkConf.'type == API_TYPE_GRPC{ |
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.
} else if apkConf.'type == API_TYPE_GRPC{ | |
} else if apkConf.'type == API_TYPE_GRPC { |
} else { | ||
return e909022("Provided Type currently not supported for GRPC APIs.", error("Provided Type currently not supported for GRPC APIs.")); | ||
} |
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.
since the if
has a return we don't need the else
here
} | ||
} | ||
if operation.operationPolicies != () { | ||
model:APIPolicy? apiPolicyCR = check self.generateAPIPolicyAndBackendCR(apiArtifact, apkConf, operation, operation.operationPolicies, organization, apiArtifact.uniqueId); |
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.
Break the long statements into few lines if possible
@@ -1564,6 +1696,11 @@ public class APIClient { | |||
return hashedValue.toBase16(); | |||
} | |||
|
|||
public isolated function getUniqueNameForGrpcApi(string concatanatedServices) returns string { |
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.
Let's have doc comments for public functions
log:printError("Error occured while deleting GrpcRoute", grpcRouteDeletionResponse); | ||
} | ||
} | ||
return; |
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 return required?
public List<String> getMethods(Service Service){ | ||
return Service.methods; | ||
} | ||
public List<Service> getServices(){ |
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.
Let's doc comments to these public methods
'}'; | ||
} | ||
} | ||
} |
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.
add a new line here
Track with #2438 |
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning