[ 
https://issues.apache.org/jira/browse/KARAF-3827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16252977#comment-16252977
 ] 

ASF GitHub Bot commented on KARAF-3827:
---------------------------------------

fpapon commented on a change in pull request #6: [KARAF-3827] - Fix Cave rest 
service doesn't retrieve the repositories
URL: https://github.com/apache/karaf-cave/pull/6#discussion_r151038420
 
 

 ##########
 File path: 
server/rest/src/main/java/org/apache/karaf/cave/server/rest/Service.java
 ##########
 @@ -47,9 +48,9 @@ public Service(CaveRepositoryService service) {
      * @throws Exception in case of creation failure.
      */
     @POST
-    @Consumes("application/xml")
-    @Produces("application/xml")
-    public Repository create(String name, boolean scan) throws Exception {
+    @Path("/repositories")
+    @Produces("application/json")
 
 Review comment:
   If I remove JABX annotations, I've got this error :
   ```
   No message body writer has been found for class 
[Lorg.apache.karaf.cave.server.rest.Repository;, ContentType: application/json
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cave rest service doesn't retrieve the repositories
> ---------------------------------------------------
>
>                 Key: KARAF-3827
>                 URL: https://issues.apache.org/jira/browse/KARAF-3827
>             Project: Karaf
>          Issue Type: Bug
>          Components: cave-rest
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: cave-4.0.1
>
>
> Even if a repository exists:
> {code}
> karaf@root()> cave:repositories 
> Name          | Location
> -----------------------------------------------------------------------------
> my-repository | /home/jbonofre/bin/apache-karaf-4.0.0/data/cave/my-repository
> {code}
> accessing the Cave REST API on:
> {code}
> http://localhost:8181/cave/rest/repositories
> {code}
> just give:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <cave-repositorys><cave-repository/></cave-repositorys>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to