Open davidediruscio opened 4 years ago
We use the same REST that other recommenders created by UDA:
Specifically, we use the methods:
getCROSSIndexCRecommendation
getCROSSIndexJavaRecommendation
getCROSSIndexJSRecommendation
getCROSSIndexPHPRecommendation
Which can be found in:
Maybe I miss something but could you give us a use case with sample data for these requests?
Hello, I hope I had understood well, here is an example:
curl -X POST "http://localhost:8080/api/recommendation/crossindex-java/"
-H "accept: application/xml"
-H "Content-Type: application/json"
-d "{ \"compilationUnit\": \"package camelinaction;import org.apache.c amel.CamelContext;import org.apache.camel.builder.RouteBuilder;import org.apache.camel.impl.DefaultCamelContext;public class FilePrinter{ public static void main (String[] args) throws Exception{ CamelContext c ontext = new DefaultCamelContext(); context.addRoutes(new RouteBuilder(){ public void configure(){} }); }}\"}"
In the compilationUnit it goes the code that the developer is creating on Eclipse. This should be similar to other recommenders, such as SORecommeder.
The URL could be:
Currently it seems a bug in the KB regarding versions of the Lucene in the maven, but that's another issue.
I have updated the curl example to properly have a running example
Hello,
I open this issue as it I might not be the case that the recommender created for exploiting the indexes is present through the Eclipse plugin. The recommender is located in the KB and it's available through the same REST API that the recommenders and tools created by UDA.
This recommender is associated to four API methods, depending on the programming language to process, C, Java, PHP and Javascript. It has for input a portion of the code being developed.
The returned object is the same that UDA recommender send.
Would it be possible to create an interface similar to those used by UDA recommenders?