From 655973da2561ddc74f76d693c48c142dcb24f15d Mon Sep 17 00:00:00 2001 From: Bartosz Gardziejewski Date: Wed, 22 Apr 2020 12:06:23 +0200 Subject: Fix getting template by name from rest endpoint Issue-ID: INT-1533 Signed-off-by: Bartosz Gardziejewski Change-Id: If7839bb91228d0e9cb43afe38c48dd11f52cb871 --- .../onap/pnfsimulator/rest/TemplateController.java | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'pnfsimulator/src/main') diff --git a/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/TemplateController.java b/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/TemplateController.java index 7eaa9ff..8f8fee7 100644 --- a/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/TemplateController.java +++ b/pnfsimulator/src/main/java/org/onap/pnfsimulator/rest/TemplateController.java @@ -25,6 +25,7 @@ import java.util.List; import java.util.Optional; import javax.validation.Valid; +import com.google.gson.Gson; import org.onap.pnfsimulator.db.Storage; import org.onap.pnfsimulator.rest.model.TemplateRequest; import org.onap.pnfsimulator.rest.model.SearchExp; @@ -63,14 +64,23 @@ public class TemplateController { } @GetMapping("get/{templateName}") - public ResponseEntity get(@PathVariable String templateName) { + public ResponseEntity get(@PathVariable String templateName) { Optional