Skip to content

Commit d6c5fab

Browse files
authored
Merge pull request #1364 from apinf/feature/upgrade-swagger-ui
Upgrade Swagger UI to 2.1.5
2 parents a0bd4ed + 580df65 commit d6c5fab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+24193
-29065
lines changed

public/swagger/css/print.css

Lines changed: 200 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
.swagger-section pre .vhdl .attribute,
8383
.swagger-section pre .clojure .attribute,
8484
.swagger-section pre .coffeescript .property {
85-
color: #8888ff;
85+
color: #88F;
8686
}
8787
.swagger-section pre .keyword,
8888
.swagger-section pre .id,
@@ -120,12 +120,75 @@
120120
.swagger-section pre .xml .cdata {
121121
opacity: 0.5;
122122
}
123+
.swagger-section .hljs {
124+
display: block;
125+
overflow-x: auto;
126+
padding: 0.5em;
127+
background: #F0F0F0;
128+
}
129+
.swagger-section .hljs,
130+
.swagger-section .hljs-subst {
131+
color: #444;
132+
}
133+
.swagger-section .hljs-keyword,
134+
.swagger-section .hljs-attribute,
135+
.swagger-section .hljs-selector-tag,
136+
.swagger-section .hljs-meta-keyword,
137+
.swagger-section .hljs-doctag,
138+
.swagger-section .hljs-name {
139+
font-weight: bold;
140+
}
141+
.swagger-section .hljs-built_in,
142+
.swagger-section .hljs-literal,
143+
.swagger-section .hljs-bullet,
144+
.swagger-section .hljs-code,
145+
.swagger-section .hljs-addition {
146+
color: #1F811F;
147+
}
148+
.swagger-section .hljs-regexp,
149+
.swagger-section .hljs-symbol,
150+
.swagger-section .hljs-variable,
151+
.swagger-section .hljs-template-variable,
152+
.swagger-section .hljs-link,
153+
.swagger-section .hljs-selector-attr,
154+
.swagger-section .hljs-selector-pseudo {
155+
color: #BC6060;
156+
}
157+
.swagger-section .hljs-type,
158+
.swagger-section .hljs-string,
159+
.swagger-section .hljs-number,
160+
.swagger-section .hljs-selector-id,
161+
.swagger-section .hljs-selector-class,
162+
.swagger-section .hljs-quote,
163+
.swagger-section .hljs-template-tag,
164+
.swagger-section .hljs-deletion {
165+
color: #880000;
166+
}
167+
.swagger-section .hljs-title,
168+
.swagger-section .hljs-section {
169+
color: #880000;
170+
font-weight: bold;
171+
}
172+
.swagger-section .hljs-comment {
173+
color: #888888;
174+
}
175+
.swagger-section .hljs-meta {
176+
color: #2B6EA1;
177+
}
178+
.swagger-section .hljs-emphasis {
179+
font-style: italic;
180+
}
181+
.swagger-section .hljs-strong {
182+
font-weight: bold;
183+
}
123184
.swagger-section .swagger-ui-wrap {
124185
line-height: 1;
125186
font-family: "Droid Sans", sans-serif;
187+
min-width: 760px;
126188
max-width: 960px;
127189
margin-left: auto;
128190
margin-right: auto;
191+
/* JSONEditor specific styling */
129192
}
130193
.swagger-section .swagger-ui-wrap b,
131194
.swagger-section .swagger-ui-wrap strong {
@@ -364,6 +427,7 @@
364427
}
365428
.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
366429
display: block;
430+
min-width: 230px;
367431
margin: 0;
368432
padding: 0;
369433
}
@@ -458,6 +522,17 @@
458522
.swagger-section .swagger-ui-wrap .required {
459523
font-weight: bold;
460524
}
525+
.swagger-section .swagger-ui-wrap .editor_holder {
526+
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
527+
font-size: 0.9em;
528+
}
529+
.swagger-section .swagger-ui-wrap .editor_holder label {
530+
font-weight: normal!important;
531+
/* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
532+
}
533+
.swagger-section .swagger-ui-wrap .editor_holder label.required {
534+
font-weight: bold!important;
535+
}
461536
.swagger-section .swagger-ui-wrap input.parameter {
462537
width: 300px;
463538
border: 1px solid #aaa;
@@ -592,6 +667,7 @@
592667
}
593668
.swagger-section .swagger-ui-wrap .markdown pre code {
594669
line-height: 1.6em;
670+
overflow: auto;
595671
}
596672
.swagger-section .swagger-ui-wrap div.gist {
597673
margin: 20px 0 25px 0 !important;
@@ -712,6 +788,9 @@
712788
color: black;
713789
text-decoration: none;
714790
}
791+
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated {
792+
text-decoration: line-through;
793+
}
715794
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
716795
text-decoration: underline;
717796
}
@@ -807,6 +886,9 @@
807886
outline: 2px solid black;
808887
outline-color: #cc0000;
809888
}
889+
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {
890+
max-width: 300px;
891+
}
810892
.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
811893
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
812894
padding: 10px;
@@ -1100,18 +1182,122 @@
11001182
}
11011183
.swagger-section .oauth_submit {
11021184
text-align: center;
1185+
display: inline-block;
1186+
}
1187+
.swagger-section .authorize-wrapper {
1188+
margin: 15px 0 10px;
1189+
}
1190+
.swagger-section .authorize-wrapper_operation {
1191+
float: right;
1192+
}
1193+
.swagger-section .authorize__btn:hover {
1194+
text-decoration: underline;
1195+
cursor: pointer;
1196+
}
1197+
.swagger-section .authorize__btn_operation:hover .authorize-scopes {
1198+
display: block;
1199+
}
1200+
.swagger-section .authorize-scopes {
1201+
position: absolute;
1202+
margin-top: 20px;
1203+
background: #FFF;
1204+
border: 1px solid #ccc;
1205+
border-radius: 5px;
1206+
display: none;
1207+
font-size: 13px;
1208+
max-width: 300px;
1209+
line-height: 30px;
1210+
color: black;
1211+
padding: 5px;
1212+
}
1213+
.swagger-section .authorize-scopes .authorize__scope {
1214+
text-decoration: none;
1215+
}
1216+
.swagger-section .authorize__btn_operation {
1217+
height: 18px;
1218+
vertical-align: middle;
1219+
display: inline-block;
1220+
background: url(../images/explorer_icons.png) no-repeat;
1221+
}
1222+
.swagger-section .authorize__btn_operation_login {
1223+
background-position: 0 0;
1224+
width: 18px;
1225+
margin-top: -6px;
1226+
margin-left: 4px;
1227+
}
1228+
.swagger-section .authorize__btn_operation_logout {
1229+
background-position: -30px 0;
1230+
width: 18px;
1231+
margin-top: -6px;
1232+
margin-left: 4px;
1233+
}
1234+
.swagger-section #auth_container {
1235+
color: #fff;
1236+
display: inline-block;
1237+
border: none;
1238+
padding: 5px;
1239+
width: 87px;
1240+
height: 13px;
1241+
}
1242+
.swagger-section #auth_container .authorize__btn {
1243+
color: #fff;
1244+
}
1245+
.swagger-section .auth_container {
1246+
padding: 0 0 10px;
1247+
margin-bottom: 5px;
1248+
border-bottom: solid 1px #CCC;
1249+
font-size: 0.9em;
1250+
}
1251+
.swagger-section .auth_container .auth__title {
1252+
color: #547f00;
1253+
font-size: 1.2em;
1254+
}
1255+
.swagger-section .auth_container .basic_auth__label {
1256+
display: inline-block;
1257+
width: 60px;
1258+
}
1259+
.swagger-section .auth_container .auth__description {
1260+
color: #999999;
1261+
margin-bottom: 5px;
1262+
}
1263+
.swagger-section .auth_container .auth__button {
1264+
margin-top: 10px;
1265+
height: 30px;
1266+
}
1267+
.swagger-section .auth_container .key_auth__field {
1268+
margin: 5px 0;
1269+
}
1270+
.swagger-section .auth_container .key_auth__label {
1271+
display: inline-block;
1272+
width: 60px;
11031273
}
11041274
.swagger-section .api-popup-dialog {
1105-
z-index: 10000;
11061275
position: absolute;
1276+
display: none;
1277+
}
1278+
.swagger-section .api-popup-dialog-wrapper {
1279+
z-index: 1000;
11071280
width: 500px;
11081281
background: #FFF;
11091282
padding: 20px;
11101283
border: 1px solid #ccc;
11111284
border-radius: 5px;
1112-
display: none;
11131285
font-size: 13px;
11141286
color: #777;
1287+
position: fixed;
1288+
top: 50%;
1289+
left: 50%;
1290+
transform: translate(-50%, -50%);
1291+
}
1292+
.swagger-section .api-popup-dialog-shadow {
1293+
position: fixed;
1294+
top: 0;
1295+
left: 0;
1296+
width: 100%;
1297+
height: 100%;
1298+
opacity: 0.2;
1299+
background-color: gray;
1300+
z-index: 900;
11151301
}
11161302
.swagger-section .api-popup-dialog .api-popup-title {
11171303
font-size: 24px;
@@ -1121,14 +1307,18 @@
11211307
font-size: 24px;
11221308
padding: 10px 0;
11231309
}
1124-
.swagger-section .api-popup-dialog p.error-msg {
1310+
.swagger-section .api-popup-dialog .error-msg {
11251311
padding-left: 5px;
11261312
padding-bottom: 5px;
11271313
}
1128-
.swagger-section .api-popup-dialog button.api-popup-authbtn {
1314+
.swagger-section .api-popup-dialog .api-popup-content {
1315+
max-height: 500px;
1316+
overflow-y: auto;
1317+
}
1318+
.swagger-section .api-popup-dialog .api-popup-authbtn {
11291319
height: 30px;
11301320
}
1131-
.swagger-section .api-popup-dialog button.api-popup-cancel {
1321+
.swagger-section .api-popup-dialog .api-popup-cancel {
11321322
height: 30px;
11331323
}
11341324
.swagger-section .api-popup-scopes {
@@ -1138,14 +1328,14 @@
11381328
padding: 5px 0;
11391329
line-height: 20px;
11401330
}
1141-
.swagger-section .api-popup-scopes .api-scope-desc {
1142-
padding-left: 20px;
1143-
font-style: italic;
1144-
}
11451331
.swagger-section .api-popup-scopes li input {
11461332
position: relative;
11471333
top: 2px;
11481334
}
1335+
.swagger-section .api-popup-scopes .api-scope-desc {
1336+
padding-left: 20px;
1337+
font-style: italic;
1338+
}
11491339
.swagger-section .api-popup-actions {
11501340
padding-top: 10px;
11511341
}

0 commit comments

Comments
 (0)