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

[GitHub] little-cui closed pull request #379: SCB-695 Fix lengthy value error in testSchema

little-cui closed pull request #379: SCB-695 Fix lengthy value error in testSchema
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/379
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js b/frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js
index 746b96be..ac0ebfc6 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;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services