-
Bug
-
Resolution: Done
-
Major
-
1.3.3.Final
-
None
With apiman-1.3.2.Final AngularJS 1.6 is causing problems because the $http service has changed and some of the methods in the UI are deprecated now.
> The $http legacy promise methods success and error have been deprecated. https://code.angularjs.org/1.5.7/docs/api/ng/service/$http#deprecation-notice
For example on the page of an single API in the definiton tab you get the following error in your browser console:
TypeError: $http(...).success is not a function at Object.getApiDefinition (apiman-manager-ui.js:1819) at loadDefinition (apiman-manager-ui.js:3006) at apiman-manager-ui.js:3047 at apiman-manager-ui.js:1405 at deps.js:47420 at completeOutstandingRequest (deps.js:33282) at deps.js:33561
In ApiDefintionSvcs in rpc.ts you can fix this with something like this:
getApiDefinition: function(orgId, apiId, version, handler, errorHandler) { var endpoint = formatEndpoint( Configuration.api.endpoint + '/organizations/:organizationId/apis/:apiId/versions/:version/definition', { organizationId: orgId, apiId: apiId, version: version }); $http({ method: 'GET', url: endpoint, transformResponse: function(value) { return value; } }).then(function (result) { handler(result.data); }, function () { errorHandler(); }); },