Fix content-type for model download in Apex Editor 91/127091/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Fri, 11 Feb 2022 16:29:45 +0000 (16:29 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Fri, 11 Feb 2022 16:29:45 +0000 (16:29 +0000)
Changed content-type to text/plain for model download
Updated javadoc to say YAML not JSON

Issue-ID: POLICY-3930
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Icb3f876003addc47e91b4f6e3b43d9c9c3dc7ee6

gui-editors/gui-editor-apex/src/main/java/org/onap/policy/gui/editors/apex/rest/handling/ApexEditorRestResource.java

index 0b777b6..b12d2db 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2016-2018 Ericsson. All rights reserved.
- *  Modifications Copyright (C) 2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020-2022 Nordix Foundation.
  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
  *  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
  * ================================================================================
@@ -217,9 +217,10 @@ public class ApexEditorRestResource implements RestCommandHandler {
     /**
      * Download the model for this session as a String.
      *
-     * @return the model represented as a JSON string. See {@code AxPolicyModel}
+     * @return the model represented as a YAML string. See {@code AxPolicyModel}
      */
     @GET
+    @Produces(MediaType.TEXT_PLAIN)
     @Path("Model/Download")
     public String downloadModel() {
         ApexApiResult result = processRestCommand(RestCommandType.MODEL, RestCommand.DOWNLOAD);