fix(ui): show api definition
Add back the accidentally removed noop transformation to avoid deserialization of `application/json` using JSON parse.
Closes:
MODIFY
manager/ui/war/plugins/api-manager/ts/api/api-def.ts
manager/ui/war/plugins/api-manager/ts/api/api-def.ts
@@ -119,7 +119,7 @@ _module.controller('Apiman.ApiDefController',
let loadDefinition = function () {
ApiDefinitionSvcs.getApiDefinition(params.org, params.api, params.version).then(
- function (definition) {
+ function (definition: string) {
$scope.apiDefinition = definition;
$scope.updatedApiDefinition = definition;
},

MODIFY
manager/ui/war/plugins/api-manager/ts/rpc.ts
manager/ui/war/plugins/api-manager/ts/rpc.ts
@@ -274,6 +274,11 @@ _module.factory('ApiDefinitionSvcs', ['$resource', '$http', 'Configuration', '$q
return $http({
method: 'GET',
url: endpoint,
+ transformResponse: function(data) {
+ // overrides the default transformations to avoid deserialization of `application/json`
+ // see: https://docs.angularjs.org/api/ng/service/$http#overriding-the-default-transformations-per-request
+ return data;
+ }
}).then(
ok => $q.resolve(ok.data),
failure => $q.reject(failure)

fix(ui): show api definition

Add back the accidentally removed noop transformation to avoid deserialization of `application/json` using JSON parse.

Closes: #2153