angular-swagger-ui is an angularJS implementation of Swagger UI
Swagger helps you documenting your RESTful API.
Swagger UI helps developers discovering your RESTful API by providing an online documentation with an integrated API explorer.
Only Swagger 2.0 is supported
application/xml is not supported
Authentication is not implemented, please use 'api-explorer-transform' directive's param to customize API calls
###Updates
application/xml is now supported
see https://github.com/vineey/angular-swagger-ui/blob/master/CHANGELOG.md for more information
bower install angular-swagger-ui --save
A builded version of the angular-swagger-ui is available at this address:
http://orange-opensource.github.io/angular-swagger-ui
All code in this repository is covered by the MIT license. See LICENSE file for copyright details.
Include angular-swagger-ui as a dependency into your application
<script type="text/javascript">
angular.module('yourApp', ['swaggerUi']);
...
</script>
Create an HTML element in your angularJS application's template or in your HTML page
<div swagger-ui url="URLToYourSwagger" api-explorer="true"></div>
Add swagger-ui.min.js and angular.min.js to the end of the body
<body>
...
<script src="yourPathToAngularJS/angular.min.js"></script>
<script src="yourPathToAngularSwaggerUI/dist/scripts/swagger-ui.min.js"></script>
</body>
Add swagger-ui.min.css and bootstrap.min.css to the head of the HTML page
<body>
<head>
...
<link rel="stylesheet" href="yourPathToBootstrapCSS/bootstrap.min.css">
<link rel="stylesheet" href="yourPathToAngularSwaggerUI/dist/css/swagger-ui.min.css">
</head>
</body>
<div swagger-ui url="URLToYourSwagger" api-explorer="true/false"></div>
<div swagger-ui url="URLToYourSwagger" error-handler="yourErrorHandler"></div>
$scope.yourErrorHandler = function(/*HTTP response*/ response, /*HTTP status*/ status){
}
<div swagger-ui url="URLToYourSwagger" api-explorer-transform="yourTransformFunction"></div>
$scope.yourTransformFunction = function(/*request options*/ options){
}