Skip to content

Commit

Permalink
fix(md): valid json not a string response (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
emjburns authored Sep 12, 2019
1 parent 71ba578 commit 084e821
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.netflix.spinnaker.kork.manageddelivery.model.Resource;
import groovy.util.logging.Slf4j;
import io.swagger.annotations.ApiOperation;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -40,10 +41,12 @@ Resource getResource(@PathVariable("name") String name) {
return keelService.getResource(name);
}

@ApiOperation(value = "Get status of a resource", response = Resource.class)
@ApiOperation(value = "Get status of a resource", response = Map.class)
@RequestMapping(value = "/resources/{name}/status", method = GET)
String getResourceStatus(@PathVariable("name") String name) {
return keelService.getResourceStatus(name);
Map getResourceStatus(@PathVariable("name") String name) {
Map<String, String> status = new HashMap<>();
status.put("status", keelService.getResourceStatus(name));
return status;
}

@ApiOperation(value = "Create or update a resource", response = Resource.class)
Expand Down

0 comments on commit 084e821

Please sign in to comment.