Modify an EGL Service Skeleton
Once the generated code is ready for your implementation, implement the business logic for each function generated. You can do it by inserting your code after the code block defining the endpoint.
Example:
package services;
service myService {
Title = "Title of the Service",
description = "Description of the Service",
version = "X.X.X" }
function randomFunction_POST(var VarClass in){
tags = [ "tags"],
description = "Description of the POST function for this path",
@PostRest {
uriTemplate = "/pathOfTheFunction",
requestFormat = JSON,
responses = [
@RestResponse{
statusCode = 200,
description = "Successful operation",
responseFormat = JSON,
responseType = ResponseVarClass
}]
}
}
SysLib.writeStdout(var.id);
end
end