You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/06/25 11:48:37 UTC

[incubator-servicecomb-service-center] branch master updated: SCB-695 Fix lengthy value error in testSchema (#379)

This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new ad0f69a  SCB-695 Fix lengthy value error in testSchema (#379)
ad0f69a is described below

commit ad0f69a38ac3ddc89e10e34e5631c5af2627870c
Author: Mohammad Asif Siddiqui <mo...@huawei.com>
AuthorDate: Mon Jun 25 17:18:35 2018 +0530

    SCB-695 Fix lengthy value error in testSchema (#379)
---
 frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
index 746b96b..ac0ebfc 100644
--- a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
+++ b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
@@ -146,6 +146,7 @@ angular.module('serviceCenter.sc')
                 httpService.apiRequest(url, method, null, headers, "nopopup").then(function(response) {
                     if (response && response.data && response.data.schema) {
                         $scope.template = response.data.schema;
+                        $scope.template =  $scope.template.replace(/\\/g, "");
                         $scope.json = YAML.parse($scope.template);
                         const ui = SwaggerUIBundle({
                             spec: $scope.json,
@@ -269,6 +270,7 @@ angular.module('serviceCenter.sc')
                                         var ip = highway[1].substring(2, highway[1].length) + ":" + highway[2].substring(0, 4);
                                     }
                                     var schema = response.data.schema;
+                                    schema = schema.replace(/\\/g, "");
                                     var json = YAML.parse(schema);
                                     json.basePath = "/testSchema" + json.basePath;
                                     json.instanceIP = ip;