efigence-swagger_ui_wrapper 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/lib/swagger_ui_wrapper.rb +5 -0
- data/lib/swagger_ui_wrapper/rack/middleware.rb +27 -0
- data/lib/swagger_ui_wrapper/version.rb +3 -0
- data/swagger_ui_wrapper.gemspec +25 -0
- data/vendor/assets/swagger/css/print.css +1362 -0
- data/vendor/assets/swagger/css/reset.css +125 -0
- data/vendor/assets/swagger/css/screen.css +1489 -0
- data/vendor/assets/swagger/css/style.css +250 -0
- data/vendor/assets/swagger/css/typography.css +14 -0
- data/vendor/assets/swagger/fonts/DroidSans-Bold.ttf +0 -0
- data/vendor/assets/swagger/fonts/DroidSans.ttf +0 -0
- data/vendor/assets/swagger/images/collapse.gif +0 -0
- data/vendor/assets/swagger/images/expand.gif +0 -0
- data/vendor/assets/swagger/images/explorer_icons.png +0 -0
- data/vendor/assets/swagger/images/favicon-16x16.png +0 -0
- data/vendor/assets/swagger/images/favicon-32x32.png +0 -0
- data/vendor/assets/swagger/images/favicon.ico +0 -0
- data/vendor/assets/swagger/images/logo_small.png +0 -0
- data/vendor/assets/swagger/images/pet_store_api.png +0 -0
- data/vendor/assets/swagger/images/throbber.gif +0 -0
- data/vendor/assets/swagger/images/wordnik_api.png +0 -0
- data/vendor/assets/swagger/index.html +105 -0
- data/vendor/assets/swagger/lang/en.js +56 -0
- data/vendor/assets/swagger/lang/es.js +53 -0
- data/vendor/assets/swagger/lang/fr.js +54 -0
- data/vendor/assets/swagger/lang/geo.js +56 -0
- data/vendor/assets/swagger/lang/it.js +52 -0
- data/vendor/assets/swagger/lang/ja.js +53 -0
- data/vendor/assets/swagger/lang/pl.js +53 -0
- data/vendor/assets/swagger/lang/pt.js +53 -0
- data/vendor/assets/swagger/lang/ru.js +56 -0
- data/vendor/assets/swagger/lang/tr.js +53 -0
- data/vendor/assets/swagger/lang/translator.js +39 -0
- data/vendor/assets/swagger/lang/zh-cn.js +53 -0
- data/vendor/assets/swagger/lib/backbone-min.js +15 -0
- data/vendor/assets/swagger/lib/handlebars-2.0.0.js +28 -0
- data/vendor/assets/swagger/lib/highlight.9.1.0.pack.js +2 -0
- data/vendor/assets/swagger/lib/highlight.9.1.0.pack_extended.js +34 -0
- data/vendor/assets/swagger/lib/jquery-1.8.0.min.js +2 -0
- data/vendor/assets/swagger/lib/jquery.ba-bbq.min.js +18 -0
- data/vendor/assets/swagger/lib/jquery.slideto.min.js +1 -0
- data/vendor/assets/swagger/lib/jquery.wiggle.min.js +8 -0
- data/vendor/assets/swagger/lib/js-yaml.min.js +3 -0
- data/vendor/assets/swagger/lib/jsoneditor.min.js +11 -0
- data/vendor/assets/swagger/lib/lodash.min.js +102 -0
- data/vendor/assets/swagger/lib/marked.js +1272 -0
- data/vendor/assets/swagger/lib/swagger-oauth.js +339 -0
- data/vendor/assets/swagger/o2c.html +20 -0
- data/vendor/assets/swagger/swagger-ui.js +22278 -0
- data/vendor/assets/swagger/swagger-ui.min.js +9 -0
- metadata +141 -0
@@ -0,0 +1,250 @@
|
|
1
|
+
.swagger-section #header a#logo {
|
2
|
+
font-size: 1.5em;
|
3
|
+
font-weight: bold;
|
4
|
+
text-decoration: none;
|
5
|
+
background: transparent url(../images/logo.png) no-repeat left center;
|
6
|
+
padding: 20px 0 20px 40px;
|
7
|
+
}
|
8
|
+
#text-head {
|
9
|
+
font-size: 80px;
|
10
|
+
font-family: 'Roboto', sans-serif;
|
11
|
+
color: #ffffff;
|
12
|
+
float: right;
|
13
|
+
margin-right: 20%;
|
14
|
+
}
|
15
|
+
.navbar-fixed-top .navbar-nav {
|
16
|
+
height: auto;
|
17
|
+
}
|
18
|
+
.navbar-fixed-top .navbar-brand {
|
19
|
+
height: auto;
|
20
|
+
}
|
21
|
+
.navbar-header {
|
22
|
+
height: auto;
|
23
|
+
}
|
24
|
+
.navbar-inverse {
|
25
|
+
background-color: #000;
|
26
|
+
border-color: #000;
|
27
|
+
}
|
28
|
+
#navbar-brand {
|
29
|
+
margin-left: 20%;
|
30
|
+
}
|
31
|
+
.navtext {
|
32
|
+
font-size: 10px;
|
33
|
+
}
|
34
|
+
.h1,
|
35
|
+
h1 {
|
36
|
+
font-size: 60px;
|
37
|
+
}
|
38
|
+
.navbar-default .navbar-header .navbar-brand {
|
39
|
+
color: #a2dfee;
|
40
|
+
}
|
41
|
+
/* tag titles */
|
42
|
+
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
|
43
|
+
color: #393939;
|
44
|
+
font-family: 'Arvo', serif;
|
45
|
+
font-size: 1.5em;
|
46
|
+
}
|
47
|
+
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
|
48
|
+
color: black;
|
49
|
+
}
|
50
|
+
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
|
51
|
+
color: #525252;
|
52
|
+
padding-left: 0px;
|
53
|
+
display: block;
|
54
|
+
clear: none;
|
55
|
+
float: left;
|
56
|
+
font-family: 'Arvo', serif;
|
57
|
+
font-weight: bold;
|
58
|
+
}
|
59
|
+
.navbar-default .navbar-collapse,
|
60
|
+
.navbar-default .navbar-form {
|
61
|
+
border-color: #0A0A0A;
|
62
|
+
}
|
63
|
+
.container1 {
|
64
|
+
width: 1500px;
|
65
|
+
margin: auto;
|
66
|
+
margin-top: 0;
|
67
|
+
background-image: url('../images/shield.png');
|
68
|
+
background-repeat: no-repeat;
|
69
|
+
background-position: -40px -20px;
|
70
|
+
margin-bottom: 210px;
|
71
|
+
}
|
72
|
+
.container-inner {
|
73
|
+
width: 1200px;
|
74
|
+
margin: auto;
|
75
|
+
background-color: rgba(223, 227, 228, 0.75);
|
76
|
+
padding-bottom: 40px;
|
77
|
+
padding-top: 40px;
|
78
|
+
border-radius: 15px;
|
79
|
+
}
|
80
|
+
.header-content {
|
81
|
+
padding: 0;
|
82
|
+
width: 1000px;
|
83
|
+
}
|
84
|
+
.title1 {
|
85
|
+
font-size: 80px;
|
86
|
+
font-family: 'Vollkorn', serif;
|
87
|
+
color: #404040;
|
88
|
+
text-align: center;
|
89
|
+
padding-top: 40px;
|
90
|
+
padding-bottom: 100px;
|
91
|
+
}
|
92
|
+
#icon {
|
93
|
+
margin-top: -18px;
|
94
|
+
}
|
95
|
+
.subtext {
|
96
|
+
font-size: 25px;
|
97
|
+
font-style: italic;
|
98
|
+
color: #08b;
|
99
|
+
text-align: right;
|
100
|
+
padding-right: 250px;
|
101
|
+
}
|
102
|
+
.bg-primary {
|
103
|
+
background-color: #00468b;
|
104
|
+
}
|
105
|
+
.navbar-default .nav > li > a,
|
106
|
+
.navbar-default .nav > li > a:focus {
|
107
|
+
color: #08b;
|
108
|
+
}
|
109
|
+
.navbar-default .nav > li > a,
|
110
|
+
.navbar-default .nav > li > a:hover {
|
111
|
+
color: #08b;
|
112
|
+
}
|
113
|
+
.navbar-default .nav > li > a,
|
114
|
+
.navbar-default .nav > li > a:focus:hover {
|
115
|
+
color: #08b;
|
116
|
+
}
|
117
|
+
.text-faded {
|
118
|
+
font-size: 25px;
|
119
|
+
font-family: 'Vollkorn', serif;
|
120
|
+
}
|
121
|
+
.section-heading {
|
122
|
+
font-family: 'Vollkorn', serif;
|
123
|
+
font-size: 45px;
|
124
|
+
padding-bottom: 10px;
|
125
|
+
}
|
126
|
+
hr {
|
127
|
+
border-color: #00468b;
|
128
|
+
padding-bottom: 10px;
|
129
|
+
}
|
130
|
+
.description {
|
131
|
+
margin-top: 20px;
|
132
|
+
padding-bottom: 200px;
|
133
|
+
}
|
134
|
+
.description li {
|
135
|
+
font-family: 'Vollkorn', serif;
|
136
|
+
font-size: 25px;
|
137
|
+
color: #525252;
|
138
|
+
margin-left: 28%;
|
139
|
+
padding-top: 5px;
|
140
|
+
}
|
141
|
+
.gap {
|
142
|
+
margin-top: 200px;
|
143
|
+
}
|
144
|
+
.troubleshootingtext {
|
145
|
+
color: rgba(255, 255, 255, 0.7);
|
146
|
+
padding-left: 30%;
|
147
|
+
}
|
148
|
+
.troubleshootingtext li {
|
149
|
+
list-style-type: circle;
|
150
|
+
font-size: 25px;
|
151
|
+
padding-bottom: 5px;
|
152
|
+
}
|
153
|
+
.overlay {
|
154
|
+
position: absolute;
|
155
|
+
top: 0;
|
156
|
+
left: 0;
|
157
|
+
width: 100%;
|
158
|
+
height: 100%;
|
159
|
+
z-index: 1000;
|
160
|
+
}
|
161
|
+
.block.response_body.json:hover {
|
162
|
+
cursor: pointer;
|
163
|
+
}
|
164
|
+
.backdrop {
|
165
|
+
color: blue;
|
166
|
+
}
|
167
|
+
#myModal {
|
168
|
+
height: 100%;
|
169
|
+
}
|
170
|
+
.modal-backdrop {
|
171
|
+
bottom: 0;
|
172
|
+
position: fixed;
|
173
|
+
}
|
174
|
+
.curl {
|
175
|
+
padding: 10px;
|
176
|
+
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
177
|
+
font-size: 0.9em;
|
178
|
+
max-height: 400px;
|
179
|
+
margin-top: 5px;
|
180
|
+
overflow-y: auto;
|
181
|
+
background-color: #fcf6db;
|
182
|
+
border: 1px solid #e5e0c6;
|
183
|
+
border-radius: 4px;
|
184
|
+
}
|
185
|
+
.curl_title {
|
186
|
+
font-size: 1.1em;
|
187
|
+
margin: 0;
|
188
|
+
padding: 15px 0 5px;
|
189
|
+
font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
|
190
|
+
font-weight: 500;
|
191
|
+
line-height: 1.1;
|
192
|
+
}
|
193
|
+
.footer {
|
194
|
+
display: none;
|
195
|
+
}
|
196
|
+
.swagger-section .swagger-ui-wrap h2 {
|
197
|
+
padding: 0;
|
198
|
+
}
|
199
|
+
h2 {
|
200
|
+
margin: 0;
|
201
|
+
margin-bottom: 5px;
|
202
|
+
}
|
203
|
+
.markdown p {
|
204
|
+
font-size: 15px;
|
205
|
+
font-family: 'Arvo', serif;
|
206
|
+
}
|
207
|
+
.swagger-section .swagger-ui-wrap .code {
|
208
|
+
font-size: 15px;
|
209
|
+
font-family: 'Arvo', serif;
|
210
|
+
}
|
211
|
+
.swagger-section .swagger-ui-wrap b {
|
212
|
+
font-family: 'Arvo', serif;
|
213
|
+
}
|
214
|
+
#signin:hover {
|
215
|
+
cursor: pointer;
|
216
|
+
}
|
217
|
+
.dropdown-menu {
|
218
|
+
padding: 15px;
|
219
|
+
}
|
220
|
+
.navbar-right .dropdown-menu {
|
221
|
+
left: 0;
|
222
|
+
right: auto;
|
223
|
+
}
|
224
|
+
#signinbutton {
|
225
|
+
width: 100%;
|
226
|
+
height: 32px;
|
227
|
+
font-size: 13px;
|
228
|
+
font-weight: bold;
|
229
|
+
color: #08b;
|
230
|
+
}
|
231
|
+
.navbar-default .nav > li .details {
|
232
|
+
color: #000000;
|
233
|
+
text-transform: none;
|
234
|
+
font-size: 15px;
|
235
|
+
font-weight: normal;
|
236
|
+
font-family: 'Open Sans', sans-serif;
|
237
|
+
font-style: italic;
|
238
|
+
line-height: 20px;
|
239
|
+
top: -2px;
|
240
|
+
}
|
241
|
+
.navbar-default .nav > li .details:hover {
|
242
|
+
color: black;
|
243
|
+
}
|
244
|
+
#signout {
|
245
|
+
width: 100%;
|
246
|
+
height: 32px;
|
247
|
+
font-size: 13px;
|
248
|
+
font-weight: bold;
|
249
|
+
color: #08b;
|
250
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/* Google Font's Droid Sans */
|
2
|
+
@font-face {
|
3
|
+
font-family: 'Droid Sans';
|
4
|
+
font-style: normal;
|
5
|
+
font-weight: 400;
|
6
|
+
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype');
|
7
|
+
}
|
8
|
+
/* Google Font's Droid Sans Bold */
|
9
|
+
@font-face {
|
10
|
+
font-family: 'Droid Sans';
|
11
|
+
font-style: normal;
|
12
|
+
font-weight: 700;
|
13
|
+
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype');
|
14
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title>Swagger UI</title>
|
6
|
+
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
|
7
|
+
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
|
8
|
+
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
|
9
|
+
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
|
10
|
+
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
11
|
+
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
|
12
|
+
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
|
13
|
+
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
|
14
|
+
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
15
|
+
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
16
|
+
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
17
|
+
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
|
18
|
+
<script src='lib/js-yaml.min.js' type='text/javascript'></script>
|
19
|
+
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
20
|
+
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
21
|
+
<script src='swagger-ui.js' type='text/javascript'></script>
|
22
|
+
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
23
|
+
<script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
|
24
|
+
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
25
|
+
<script src='lib/marked.js' type='text/javascript'></script>
|
26
|
+
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
27
|
+
|
28
|
+
<!-- Some basic translations -->
|
29
|
+
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
|
30
|
+
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
|
31
|
+
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
|
32
|
+
|
33
|
+
<script type="text/javascript">
|
34
|
+
$(function () {
|
35
|
+
var url = window.location.search.match(/url=([^&]+)/);
|
36
|
+
if (url && url.length > 1) {
|
37
|
+
url = decodeURIComponent(url[1]);
|
38
|
+
} else {
|
39
|
+
url = "http://petstore.swagger.io/v2/swagger.json";
|
40
|
+
}
|
41
|
+
|
42
|
+
hljs.configure({
|
43
|
+
highlightSizeThreshold: 5000
|
44
|
+
});
|
45
|
+
|
46
|
+
// Pre load translate...
|
47
|
+
if(window.SwaggerTranslator) {
|
48
|
+
window.SwaggerTranslator.translate();
|
49
|
+
}
|
50
|
+
window.swaggerUi = new SwaggerUi({
|
51
|
+
url: url,
|
52
|
+
dom_id: "swagger-ui-container",
|
53
|
+
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
54
|
+
onComplete: function(swaggerApi, swaggerUi){
|
55
|
+
if(typeof initOAuth == "function") {
|
56
|
+
initOAuth({
|
57
|
+
clientId: "your-client-id",
|
58
|
+
clientSecret: "your-client-secret-if-required",
|
59
|
+
realm: "your-realms",
|
60
|
+
appName: "your-app-name",
|
61
|
+
scopeSeparator: ",",
|
62
|
+
additionalQueryStringParams: {}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
|
66
|
+
if(window.SwaggerTranslator) {
|
67
|
+
window.SwaggerTranslator.translate();
|
68
|
+
}
|
69
|
+
},
|
70
|
+
onFailure: function(data) {
|
71
|
+
log("Unable to Load SwaggerUI");
|
72
|
+
},
|
73
|
+
docExpansion: "none",
|
74
|
+
jsonEditor: false,
|
75
|
+
defaultModelRendering: 'schema',
|
76
|
+
showRequestHeaders: false
|
77
|
+
});
|
78
|
+
|
79
|
+
window.swaggerUi.load();
|
80
|
+
|
81
|
+
function log() {
|
82
|
+
if ('console' in window) {
|
83
|
+
console.log.apply(console, arguments);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
</script>
|
88
|
+
</head>
|
89
|
+
|
90
|
+
<body class="swagger-section">
|
91
|
+
<div id='header'>
|
92
|
+
<div class="swagger-ui-wrap">
|
93
|
+
<a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>
|
94
|
+
<form id='api_selector'>
|
95
|
+
<div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
|
96
|
+
<div id='auth_container'></div>
|
97
|
+
<div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
|
98
|
+
</form>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
|
103
|
+
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
|
104
|
+
</body>
|
105
|
+
</html>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
/* jshint quotmark: double */
|
4
|
+
window.SwaggerTranslator.learn({
|
5
|
+
"Warning: Deprecated":"Warning: Deprecated",
|
6
|
+
"Implementation Notes":"Implementation Notes",
|
7
|
+
"Response Class":"Response Class",
|
8
|
+
"Status":"Status",
|
9
|
+
"Parameters":"Parameters",
|
10
|
+
"Parameter":"Parameter",
|
11
|
+
"Value":"Value",
|
12
|
+
"Description":"Description",
|
13
|
+
"Parameter Type":"Parameter Type",
|
14
|
+
"Data Type":"Data Type",
|
15
|
+
"Response Messages":"Response Messages",
|
16
|
+
"HTTP Status Code":"HTTP Status Code",
|
17
|
+
"Reason":"Reason",
|
18
|
+
"Response Model":"Response Model",
|
19
|
+
"Request URL":"Request URL",
|
20
|
+
"Response Body":"Response Body",
|
21
|
+
"Response Code":"Response Code",
|
22
|
+
"Response Headers":"Response Headers",
|
23
|
+
"Hide Response":"Hide Response",
|
24
|
+
"Headers":"Headers",
|
25
|
+
"Try it out!":"Try it out!",
|
26
|
+
"Show/Hide":"Show/Hide",
|
27
|
+
"List Operations":"List Operations",
|
28
|
+
"Expand Operations":"Expand Operations",
|
29
|
+
"Raw":"Raw",
|
30
|
+
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
|
31
|
+
"Example Value":"Example Value",
|
32
|
+
"Model Schema":"Model Schema",
|
33
|
+
"Model":"Model",
|
34
|
+
"Click to set as parameter value":"Click to set as parameter value",
|
35
|
+
"apply":"apply",
|
36
|
+
"Username":"Username",
|
37
|
+
"Password":"Password",
|
38
|
+
"Terms of service":"Terms of service",
|
39
|
+
"Created by":"Created by",
|
40
|
+
"See more at":"See more at",
|
41
|
+
"Contact the developer":"Contact the developer",
|
42
|
+
"api version":"api version",
|
43
|
+
"Response Content Type":"Response Content Type",
|
44
|
+
"Parameter content type:":"Parameter content type:",
|
45
|
+
"fetching resource":"fetching resource",
|
46
|
+
"fetching resource list":"fetching resource list",
|
47
|
+
"Explore":"Explore",
|
48
|
+
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
|
49
|
+
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.",
|
50
|
+
"Please specify the protocol for":"Please specify the protocol for",
|
51
|
+
"Can't read swagger JSON from":"Can't read swagger JSON from",
|
52
|
+
"Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
|
53
|
+
"Unable to read api":"Unable to read api",
|
54
|
+
"from path":"from path",
|
55
|
+
"server returned":"server returned"
|
56
|
+
});
|