package org.mskcc.cbio.oncokb.api.pub.v1;

import org.mskcc.cbio.oncokb.model.Geneset;
import org.mskcc.cbio.oncokb.util.ApplicationContextSingleton;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * Created by Hongxin Zhang on 2019-08-09.
 */
@Controller
public class GenesetsApiController implements GenesetsApi {
    @Override
    public ResponseEntity<List<Geneset>> genesetsGet() {
        return new ResponseEntity<>(ApplicationContextSingleton.getGenesetBo().findAll(), HttpStatus.OK);
    }

    @Override
    public ResponseEntity<Geneset> genesetsIdGet(Integer id) {
        return new ResponseEntity<>(ApplicationContextSingleton.getGenesetBo().findGenesetById(id), HttpStatus.OK);
    }
}

@@ -36,16 +36,56 @@
 ub.v1;%0A%0A
+import io.swagger.annotations.ApiParam;%0A
 import o
@@ -120,16 +120,16 @@
 eneset;%0A
-
 import o
@@ -324,16 +324,77 @@
 troller;
+%0Aimport org.springframework.web.bind.annotation.PathVariable;
 %0A%0Aimport
@@ -781,16 +781,102 @@
 tsIdGet(
+%0A        @ApiParam(value = %22Geneset ID%22, required = true) @PathVariable(value = %22id%22) 
 Integer 
@@ -877,16 +877,21 @@
 teger id
+%0A    
 ) %7B%0A    

Include swagger definition in the implementation