Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit abf1ebe

Browse files
committed
new release
1 parent 77a78c8 commit abf1ebe

File tree

7 files changed

+87
-53
lines changed

7 files changed

+87
-53
lines changed

dist/css/swagger-ui.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Orange angular-swagger-ui - v0.2.1
2+
* Orange angular-swagger-ui - v0.2.2
33
*
44
* (C) 2015 Orange, all right reserved
55
* MIT Licensed

dist/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,33 @@
22
<html class="no-js" ng-app="myApp">
33
<head>
44
<meta charset="utf-8">
5+
<title>angular-swagger-ui sample</title>
56
<meta name="viewport" content="width=device-width">
67
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
78
<link rel="stylesheet" href="css/swagger-ui.min.css">
89
</head>
910
<body>
1011
<div ng-controller="MyCtrl" class="container" style="margin-bottom:100px">
11-
<h1>angular-swagger-ui example</h1>
12+
<h1>angular-swagger-ui sample</h1>
1213
<form name="urlForm" ng-submit="urlForm.$valid&&(swaggerUrl=url)" class="form-inline">
1314
<input type="url" placeholder="swagger URL" class="form-control" id="url" name="url" ng-model="url" required style="width:400px">
1415
<button type="submit" class="btn btn-primary">explore</button>
1516
</form>
1617
<h3 ng-show="isLoading">loading ...</h3>
17-
<div swagger-ui url="swaggerUrl" loading="isLoading" api-explorer="true" error-handler="myErrorHandler"></div>
18+
<div swagger-ui url="swaggerUrl" loading="isLoading" parser="json" api-explorer="true" error-handler="myErrorHandler"></div>
1819
</div>
1920
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular.min.js"></script>
2021
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.17/angular-sanitize.min.js"></script>
2122
<script src="scripts/swagger-ui.min.js"></script>
23+
<script src="scripts/modules/swagger-external-references.min.js"></script>
24+
<script src="scripts/modules/swagger1-to-swagger2-converter.min.js"></script>
2225
<script type="text/javascript">
2326
angular
2427
.module('myApp', ['ngSanitize', 'swaggerUi'])
28+
.run(function(swaggerModules, swaggerUiExternalReferences, swagger1ToSwagger2Converter){
29+
swaggerModules.add(swaggerModules.BEFORE_PARSE, swagger1ToSwagger2Converter);
30+
swaggerModules.add(swaggerModules.BEFORE_PARSE, swaggerUiExternalReferences);
31+
})
2532
.controller('MyCtrl', function($scope){
2633
// init form
2734
$scope.isLoading = false;

dist/scripts/modules/swagger-external-references.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
2-
* Orange angular-swagger-ui - v0.2.1
2+
* Orange angular-swagger-ui - v0.2.2
33
*
44
* (C) 2015 Orange, all right reserved
55
* MIT Licensed
66
*/
7-
"use strict";angular.module("swaggerUi").service("swaggerUiXmlFormatter",["$q",function(a){function b(a){var b="",c=/(>)(<)(\/*)/g,d=0;return a=a.replace(c,"$1\r\n$2$3"),angular.forEach(a.split("\r\n"),function(a){var c=0,e="";a.match(/.+<\/\w[^>]*>$/)?c=0:a.match(/^<\/\w/)?0!==d&&(d-=1):c=a.match(/^<\w[^>]*[^\/]>.*$/)?1:0;for(var f=0;d>f;f++)e+=" ";b+=e+a+"\r\n",d+=c}),b}this.execute=function(c){var d=a.defer();return c.headers&&"application/xml"===c.headers()["content-type"]&&(c.data=b(c.data)),d.resolve(),d.promise}}]);
7+
"use strict";angular.module("swaggerUi").service("swaggerUiXmlFormatter",["$q",function(a){function b(a){var b="",c=/(>)(<)(\/*)/g,d=0;return a=a.replace(c,"$1\r\n$2$3"),angular.forEach(a.split("\r\n"),function(a){var c=0,e="";a.match(/.+<\/\w[^>]*>$/)?c=0:a.match(/^<\/\w/)?0!==d&&(d-=1):c=a.match(/^<\w[^>]*[^\/]>.*$/)?1:0;for(var f=0;d>f;f++)e+=" ";b+=e+a+"\r\n",d+=c}),b}this.execute=function(c){var d=!1,e=a.defer();return c.headers&&"application/xml"===c.headers()["content-type"]&&(c.data=b(c.data),d=!0),e.resolve(d),e.promise}}]);

dist/scripts/modules/swagger1-to-swagger2-converter.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)