diff --git a/.classpath b/.classpath index 24af683..3ddb56b 100644 --- a/.classpath +++ b/.classpath @@ -7,6 +7,6 @@ - + diff --git a/build.xml b/build.xml index c69e5ac..25d977b 100644 --- a/build.xml +++ b/build.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/i5/las2peer/services/noracleService/NoracleService.java b/src/main/i5/las2peer/services/noracleService/NoracleService.java index a7b1c8d..2713def 100644 --- a/src/main/i5/las2peer/services/noracleService/NoracleService.java +++ b/src/main/i5/las2peer/services/noracleService/NoracleService.java @@ -14,12 +14,19 @@ import io.swagger.annotations.SwaggerDefinition; @Api -@SwaggerDefinition(info = @Info(title = "Noracle Service", version = NoracleService.API_VERSION, description = "A bundle service for the distributed Noracle system", license = @License(name = "BSD-3", url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt"))) +@SwaggerDefinition( + info = @Info( + title = "Noracle Service", + version = NoracleService.API_VERSION, + description = "A bundle service for the distributed Noracle system", + license = @License( + name = "BSD-3", + url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt"))) @ServicePath("/" + NoracleService.RESOURCE_NAME) public class NoracleService extends RESTService { public static final String RESOURCE_NAME = "distributed-noracle"; - public static final String API_VERSION = "0.6"; + public static final String API_VERSION = "0.7"; @Override protected void initResources() { diff --git a/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java b/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java index 6f367c8..5ae1b81 100644 --- a/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java +++ b/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java @@ -72,7 +72,8 @@ public Vote putSetQuestionVote(@PathParam("spaceId") String spaceId, @PathParam( obj.put("spaceId", spaceId); obj.put("qId", questionId); - obj.put("functionName", "putSetVote"); + obj.put("functionName", "putSetQuestionVote"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); attributes.put("spaceId", spaceId); attributes.put("qId", questionId); diff --git a/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java b/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java index a26624b..2a7e38e 100644 --- a/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java +++ b/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java @@ -82,9 +82,11 @@ public Response createQuestion(@PathParam("spaceId") String questionSpaceId, @Ap JSONObject obj = new JSONObject(); JSONObject attributes = new JSONObject(); obj.put("functionName", "createQuestion"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); obj.put("qid", question.getQuestionId()); attributes.put("spaceId", questionSpaceId); + attributes.put("userId", Context.getCurrent().getMainAgent().getIdentifier()); attributes.put("body", p.parse(createRelationPojoJson)); attributes.put("result", question.getQuestionId()); obj.put("attributes", attributes); @@ -129,6 +131,7 @@ public Response createRelatedQuestion(@PathParam("spaceId") String questionSpace JSONObject obj = new JSONObject(); JSONObject attributes = new JSONObject(); obj.put("functionName", "createQuestion"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); obj.put("qid", question.getQuestionId()); attributes.put("spaceId", questionSpaceId);