Search in sources :

Example 1 with Comment

use of org.eclipse.vorto.repository.comment.Comment in project vorto by eclipse.

the class CommentController method getCommentsforModelId.

@ApiOperation(value = "Returns comments for a specific Model Resource")
@ApiResponses(value = { @ApiResponse(code = 404, message = "Not found"), @ApiResponse(code = 200, message = "OK") })
@RequestMapping(method = RequestMethod.GET, value = "/comments/model/{namespace}/{name}/{version:.+}", produces = "application/json")
public List<Comment> getCommentsforModelId(@ApiParam(value = "namespace", required = true) @PathVariable String namespace, @ApiParam(value = "name", required = true) @PathVariable String name, @ApiParam(value = "version", required = true) @PathVariable String version) {
    final ModelId modelId = new ModelId(name, namespace, version);
    List<Comment> comments = commentService.getCommentsforModelId(modelId);
    return comments;
}
Also used : Comment(org.eclipse.vorto.repository.comment.Comment) ModelId(org.eclipse.vorto.repository.api.ModelId) ApiOperation(io.swagger.annotations.ApiOperation) ApiResponses(io.swagger.annotations.ApiResponses) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ApiOperation (io.swagger.annotations.ApiOperation)1 ApiResponses (io.swagger.annotations.ApiResponses)1 ModelId (org.eclipse.vorto.repository.api.ModelId)1 Comment (org.eclipse.vorto.repository.comment.Comment)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1