Merge remote-tracking branch 'swagger/develop_2.0' into JSONEditorMerge
Conflicts: dist/index.html dist/swagger-ui.js dist/swagger-ui.min.js src/main/html/index.html src/main/template/param.handlebars src/main/template/param_required.handlebars
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -9,3 +9,5 @@ dist/**/*.woff binary
|
|||||||
dist/**/*.woff2 binary
|
dist/**/*.woff2 binary
|
||||||
dist/**/*.png binary
|
dist/**/*.png binary
|
||||||
dist/*.html text
|
dist/*.html text
|
||||||
|
|
||||||
|
src/main/html/images/*.png binary
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## Pull Requests
|
## Pull Requests
|
||||||
Plase make your pull requests are made to the [**`develop_2.0`**](https://github.com/swagger-api/swagger-ui/tree/develop_2.0) branch at this time.
|
Please open your pull requests against the [**`develop_2.0`**](https://github.com/swagger-api/swagger-ui/tree/develop_2.0) branch at this time.
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
SwaggerUI uses [SwaggerJS](https://github.com/swagger-api/swagger-js) library for many internal operations. If you see errors in
|
SwaggerUI uses [SwaggerJS](https://github.com/swagger-api/swagger-js) library for many internal operations. If you see errors in
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
###
|
###
|
||||||
# swagger-ui-builder - https://github.com/wordnik/swagger-ui/
|
# swagger-ui-builder - https://github.com/swagger-api/swagger-ui/
|
||||||
# Container for building the swagger-ui static site
|
# Container for building the swagger-ui static site
|
||||||
#
|
#
|
||||||
# Build: docker build -t swagger-ui-builder .
|
# Build: docker build -t swagger-ui-builder .
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright 2015 Reverb Technologies, Inc.
|
Copyright 2015 SmartBear Software
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -20,7 +20,7 @@ The Swagger Specification has undergone 4 revisions since initial creation in 20
|
|||||||
|
|
||||||
Swagger UI Version | Release Date | Swagger Spec compatibility | Notes | Status
|
Swagger UI Version | Release Date | Swagger Spec compatibility | Notes | Status
|
||||||
------------------ | ------------ | -------------------------- | ----- | ------
|
------------------ | ------------ | -------------------------- | ----- | ------
|
||||||
2.1.1-M2 | 2015-04-16 | 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-ui) |
|
2.1.1 | 2015-06-06 | 1.1, 1.2, 2.0 | [master](https://github.com/swagger-api/swagger-ui) |
|
||||||
2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
|
2.0.24 | 2014-09-12 | 1.1, 1.2 | [tag v2.0.24](https://github.com/swagger-api/swagger-ui/tree/v2.0.24) |
|
||||||
1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
|
1.0.13 | 2013-03-08 | 1.1, 1.2 | [tag v1.0.13](https://github.com/swagger-api/swagger-ui/tree/v1.0.13) |
|
||||||
1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
|
1.0.1 | 2011-10-11 | 1.0, 1.1 | [tag v1.0.1](https://github.com/swagger-api/swagger-ui/tree/v1.0.1) |
|
||||||
@@ -96,8 +96,9 @@ operationsSorter | Apply a sort to the operation list of each API. It can be 'al
|
|||||||
onComplete | This is a callback function parameter which can be passed to be notified of when SwaggerUI has completed rendering successfully.
|
onComplete | This is a callback function parameter which can be passed to be notified of when SwaggerUI has completed rendering successfully.
|
||||||
onFailure | This is a callback function parameter which can be passed to be notified of when SwaggerUI encountered a failure was unable to render.
|
onFailure | This is a callback function parameter which can be passed to be notified of when SwaggerUI encountered a failure was unable to render.
|
||||||
highlightSizeThreshold | Any size response below this threshold will be highlighted syntactically, attempting to highlight large responses can lead to browser hangs, not including a threshold will default to highlight all returned responses.
|
highlightSizeThreshold | Any size response below this threshold will be highlighted syntactically, attempting to highlight large responses can lead to browser hangs, not including a threshold will default to highlight all returned responses.
|
||||||
supportedSubmitMethods | An array of of the HTTP operations that will have the 'Try it out!` option. An empty array disables all operations. This does not filter the operations from the display.
|
supportedSubmitMethods | An array of of the HTTP operations that will have the 'Try it out!' option. An empty array disables all operations. This does not filter the operations from the display.
|
||||||
oauth2RedirectUrl | OAuth redirect URL
|
oauth2RedirectUrl | OAuth redirect URL
|
||||||
|
showRequestHeaders | Whether or not to show the headers that were sent when making a request via the 'Try it out!' option. Defaults to `false`.
|
||||||
|
|
||||||
* All other parameters are explained in greater detail below
|
* All other parameters are explained in greater detail below
|
||||||
|
|
||||||
@@ -131,7 +132,7 @@ swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorizat
|
|||||||
Note! You can pass multiple header params on a single request, just use unique names for them (`key` is used in the above example).
|
Note! You can pass multiple header params on a single request, just use unique names for them (`key` is used in the above example).
|
||||||
|
|
||||||
### Localization and translation
|
### Localization and translation
|
||||||
The localization files are in the dist/lang directory.
|
The localization files are in the [lang](/lang) directory. Note that language files and translator is not included in SwaggerUI by default. You need to add them manually.
|
||||||
|
|
||||||
To enable translation you should append next two lines in your Swagger's index.html (or another entry point you use)
|
To enable translation you should append next two lines in your Swagger's index.html (or another entry point you use)
|
||||||
```html
|
```html
|
||||||
@@ -156,6 +157,7 @@ or <anyHtmlTag data-sw-translate value='new sentence'/>
|
|||||||
At this moment only inner html, title-attribute and value-attribute are going to be translated.
|
At this moment only inner html, title-attribute and value-attribute are going to be translated.
|
||||||
|
|
||||||
## CORS Support
|
## CORS Support
|
||||||
|
### OR: How to deal with "Can't read from server. It may not have the appropriate access-control-origin settings."
|
||||||
|
|
||||||
CORS is a technique to prevent websites from doing bad things with your personal data. Most browsers + javascript toolkits not only support CORS but enforce it, which has implications for your API server which supports Swagger.
|
CORS is a technique to prevent websites from doing bad things with your personal data. Most browsers + javascript toolkits not only support CORS but enforce it, which has implications for your API server which supports Swagger.
|
||||||
|
|
||||||
@@ -223,11 +225,11 @@ Create your own fork of [swagger-api/swagger-ui](https://github.com/swagger-api/
|
|||||||
To share your changes, [submit a pull request](https://github.com/swagger-api/swagger-ui/pull/new/develop_2.0).
|
To share your changes, [submit a pull request](https://github.com/swagger-api/swagger-ui/pull/new/develop_2.0).
|
||||||
|
|
||||||
## Change Log
|
## Change Log
|
||||||
Plsee see [releases](https://github.com/swagger-api/swagger-ui/releases) for change log.
|
Please see [releases](https://github.com/swagger-api/swagger-ui/releases) for change log.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright 2011-2015 Reverb technologies, Inc.
|
Copyright 2011-2015 SmartBear Software
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "swagger-ui",
|
"name": "swagger-ui",
|
||||||
"main": "dist/index.html",
|
"main": "dist/index.html",
|
||||||
"version": "2.1.8-M1",
|
"version": "2.1.0",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Mohsen Azimi <me@azimi.me>"
|
"Mohsen Azimi <me@azimi.me>"
|
||||||
],
|
],
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"Swagger",
|
"Swagger",
|
||||||
"API"
|
"API"
|
||||||
],
|
],
|
||||||
"license": "Copyright 2015 Reverb Technologies, Inc.",
|
"license": "Copyright 2015 SmartBear Software",
|
||||||
"homepage": "http://swagger.io",
|
"homepage": "http://swagger.io",
|
||||||
"private": true,
|
"private": true,
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
|||||||
17
dist/css/print.css
vendored
17
dist/css/print.css
vendored
@@ -275,6 +275,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap p.big,
|
.swagger-section .swagger-ui-wrap p.big,
|
||||||
.swagger-section .swagger-ui-wrap div.big p {
|
.swagger-section .swagger-ui-wrap div.big p {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@@ -424,6 +427,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -1074,6 +1088,9 @@
|
|||||||
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
.swagger-section .title {
|
.swagger-section .title {
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
17
dist/css/screen.css
vendored
17
dist/css/screen.css
vendored
@@ -275,6 +275,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap p.big,
|
.swagger-section .swagger-ui-wrap p.big,
|
||||||
.swagger-section .swagger-ui-wrap div.big p {
|
.swagger-section .swagger-ui-wrap div.big p {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@@ -424,6 +427,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -1074,6 +1088,9 @@
|
|||||||
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
.swagger-section .title {
|
.swagger-section .title {
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
250
dist/css/style.css
vendored
Normal file
250
dist/css/style.css
vendored
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
.swagger-section #header a#logo {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
background: transparent url(../images/logo.png) no-repeat left center;
|
||||||
|
padding: 20px 0 20px 40px;
|
||||||
|
}
|
||||||
|
#text-head {
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
float: right;
|
||||||
|
margin-right: 20%;
|
||||||
|
}
|
||||||
|
.navbar-fixed-top .navbar-nav {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-fixed-top .navbar-brand {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-header {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
|
background-color: #000;
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
#navbar-brand {
|
||||||
|
margin-left: 20%;
|
||||||
|
}
|
||||||
|
.navtext {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.h1,
|
||||||
|
h1 {
|
||||||
|
font-size: 60px;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-header .navbar-brand {
|
||||||
|
color: #a2dfee;
|
||||||
|
}
|
||||||
|
/* tag titles */
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
|
||||||
|
color: #393939;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
|
||||||
|
color: #525252;
|
||||||
|
padding-left: 0px;
|
||||||
|
display: block;
|
||||||
|
clear: none;
|
||||||
|
float: left;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-collapse,
|
||||||
|
.navbar-default .navbar-form {
|
||||||
|
border-color: #0A0A0A;
|
||||||
|
}
|
||||||
|
.container1 {
|
||||||
|
width: 1500px;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 0;
|
||||||
|
background-image: url('../images/shield.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: -40px -20px;
|
||||||
|
margin-bottom: 210px;
|
||||||
|
}
|
||||||
|
.container-inner {
|
||||||
|
width: 1200px;
|
||||||
|
margin: auto;
|
||||||
|
background-color: rgba(223, 227, 228, 0.75);
|
||||||
|
padding-bottom: 40px;
|
||||||
|
padding-top: 40px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
.header-content {
|
||||||
|
padding: 0;
|
||||||
|
width: 1000px;
|
||||||
|
}
|
||||||
|
.title1 {
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
color: #404040;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 40px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
#icon {
|
||||||
|
margin-top: -18px;
|
||||||
|
}
|
||||||
|
.subtext {
|
||||||
|
font-size: 25px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #08b;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 250px;
|
||||||
|
}
|
||||||
|
.bg-primary {
|
||||||
|
background-color: #00468b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:focus {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:focus:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.text-faded {
|
||||||
|
font-size: 25px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
}
|
||||||
|
.section-heading {
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 45px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
border-color: #00468b;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
.description {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 200px;
|
||||||
|
}
|
||||||
|
.description li {
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #525252;
|
||||||
|
margin-left: 28%;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
.gap {
|
||||||
|
margin-top: 200px;
|
||||||
|
}
|
||||||
|
.troubleshootingtext {
|
||||||
|
color: rgba(255, 255, 255, 0.7);
|
||||||
|
padding-left: 30%;
|
||||||
|
}
|
||||||
|
.troubleshootingtext li {
|
||||||
|
list-style-type: circle;
|
||||||
|
font-size: 25px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
.overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
.block.response_body.json:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.backdrop {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
#myModal {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.modal-backdrop {
|
||||||
|
bottom: 0;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.curl {
|
||||||
|
padding: 10px;
|
||||||
|
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||||
|
font-size: 0.9em;
|
||||||
|
max-height: 400px;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: #fcf6db;
|
||||||
|
border: 1px solid #e5e0c6;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.curl_title {
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px 0 5px;
|
||||||
|
font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap h2 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.markdown p {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .code {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap b {
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
#signin:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.navbar-right .dropdown-menu {
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
#signinbutton {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li .details {
|
||||||
|
color: #000000;
|
||||||
|
text-transform: none;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-style: italic;
|
||||||
|
line-height: 20px;
|
||||||
|
top: -2px;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li .details:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
#signout {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
9
dist/index.html
vendored
9
dist/index.html
vendored
@@ -21,6 +21,7 @@
|
|||||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
||||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/marked.js' type='text/javascript'></script>
|
<script src='lib/marked.js' type='text/javascript'></script>
|
||||||
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
@@ -36,13 +37,11 @@
|
|||||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
||||||
onComplete: function(swaggerApi, swaggerUi){
|
onComplete: function(swaggerApi, swaggerUi){
|
||||||
if(typeof initOAuth == "function") {
|
if(typeof initOAuth == "function") {
|
||||||
/*
|
|
||||||
initOAuth({
|
initOAuth({
|
||||||
clientId: "your-client-id",
|
clientId: "your-client-id",
|
||||||
realm: "your-realms",
|
realm: "your-realms",
|
||||||
appName: "your-app-name"
|
appName: "your-app-name"
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('pre code').each(function(i, e) {
|
$('pre code').each(function(i, e) {
|
||||||
@@ -55,8 +54,9 @@
|
|||||||
log("Unable to Load SwaggerUI");
|
log("Unable to Load SwaggerUI");
|
||||||
},
|
},
|
||||||
docExpansion: "none",
|
docExpansion: "none",
|
||||||
sorter : "alpha",
|
jsonEditor:true,
|
||||||
jsonEditor:true
|
apisSorter: "alpha",
|
||||||
|
showRequestHeaders: false
|
||||||
});
|
});
|
||||||
|
|
||||||
function addApiKeyAuthorization(){
|
function addApiKeyAuthorization(){
|
||||||
@@ -74,7 +74,6 @@
|
|||||||
/*
|
/*
|
||||||
var apiKey = "myApiKeyXXXX123456789";
|
var apiKey = "myApiKeyXXXX123456789";
|
||||||
$('#input_apiKey').val(apiKey);
|
$('#input_apiKey').val(apiKey);
|
||||||
addApiKeyAuthorization();
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.load();
|
||||||
|
|||||||
12717
dist/swagger-ui.js
vendored
12717
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
22
dist/swagger-ui.min.js
vendored
22
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
15
gulpfile.js
15
gulpfile.js
@@ -15,6 +15,7 @@ var connect = require('gulp-connect');
|
|||||||
var header = require('gulp-header');
|
var header = require('gulp-header');
|
||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
var order = require('gulp-order');
|
var order = require('gulp-order');
|
||||||
|
var jshint = require('gulp-jshint');
|
||||||
var banner = ['/**',
|
var banner = ['/**',
|
||||||
' * <%= pkg.name %> - <%= pkg.description %>',
|
' * <%= pkg.name %> - <%= pkg.description %>',
|
||||||
' * @version v<%= pkg.version %>',
|
' * @version v<%= pkg.version %>',
|
||||||
@@ -48,10 +49,19 @@ function templates() {
|
|||||||
.on('error', log);
|
.on('error', log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JShint all *.js files
|
||||||
|
*/
|
||||||
|
gulp.task('lint', function () {
|
||||||
|
return gulp.src('./src/main/javascript/**/*.js')
|
||||||
|
.pipe(jshint())
|
||||||
|
.pipe(jshint.reporter('jshint-stylish'));
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a distribution
|
* Build a distribution
|
||||||
*/
|
*/
|
||||||
gulp.task('dist', ['clean'], function() {
|
gulp.task('dist', ['clean','lint'], function() {
|
||||||
|
|
||||||
return es.merge(
|
return es.merge(
|
||||||
gulp.src([
|
gulp.src([
|
||||||
@@ -82,7 +92,8 @@ gulp.task('less', ['clean'], function() {
|
|||||||
.src([
|
.src([
|
||||||
'./src/main/less/screen.less',
|
'./src/main/less/screen.less',
|
||||||
'./src/main/less/print.less',
|
'./src/main/less/print.less',
|
||||||
'./src/main/less/reset.less'
|
'./src/main/less/reset.less',
|
||||||
|
'./src/main/less/style.less'
|
||||||
])
|
])
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.on('error', log)
|
.on('error', log)
|
||||||
|
|||||||
52
lang/en.js
Normal file
52
lang/en.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Warning: Deprecated",
|
||||||
|
"Implementation Notes":"Implementation Notes",
|
||||||
|
"Response Class":"Response Class",
|
||||||
|
"Status":"Status",
|
||||||
|
"Parameters":"Parameters",
|
||||||
|
"Parameter":"Parameter",
|
||||||
|
"Value":"Value",
|
||||||
|
"Description":"Description",
|
||||||
|
"Parameter Type":"Parameter Type",
|
||||||
|
"Data Type":"Data Type",
|
||||||
|
"Response Messages":"Response Messages",
|
||||||
|
"HTTP Status Code":"HTTP Status Code",
|
||||||
|
"Reason":"Reason",
|
||||||
|
"Response Model":"Response Model",
|
||||||
|
"Request URL":"Request URL",
|
||||||
|
"Response Body":"Response Body",
|
||||||
|
"Response Code":"Response Code",
|
||||||
|
"Response Headers":"Response Headers",
|
||||||
|
"Hide Response":"Hide Response",
|
||||||
|
"Try it out!":"Try it out!",
|
||||||
|
"Show/Hide":"Show/Hide",
|
||||||
|
"List Operations":"List Operations",
|
||||||
|
"Expand Operations":"Expand Operations",
|
||||||
|
"Raw":"Raw",
|
||||||
|
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
|
||||||
|
"Model Schema":"Model Schema",
|
||||||
|
"Model":"Model",
|
||||||
|
"apply":"apply",
|
||||||
|
"Username":"Username",
|
||||||
|
"Password":"Password",
|
||||||
|
"Terms of service":"Terms of service",
|
||||||
|
"Created by":"Created by",
|
||||||
|
"See more at":"See more at",
|
||||||
|
"Contact the developer":"Contact the developer",
|
||||||
|
"api version":"api version",
|
||||||
|
"Response Content Type":"Response Content Type",
|
||||||
|
"fetching resource":"fetching resource",
|
||||||
|
"fetching resource list":"fetching resource list",
|
||||||
|
"Explore":"Explore",
|
||||||
|
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
|
||||||
|
"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.",
|
||||||
|
"Please specify the protocol for":"Please specify the protocol for",
|
||||||
|
"Can't read swagger JSON from":"Can't read swagger JSON from",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
|
||||||
|
"Unable to read api":"Unable to read api",
|
||||||
|
"from path":"from path",
|
||||||
|
"server returned":"server returned"
|
||||||
|
});
|
||||||
52
lang/ru.js
Normal file
52
lang/ru.js
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Ворнинг: Депрекейтед",
|
||||||
|
"Implementation Notes":"Заметки",
|
||||||
|
"Response Class":"Пример ответа",
|
||||||
|
"Status":"Статус",
|
||||||
|
"Parameters":"Параметры",
|
||||||
|
"Parameter":"Параметр",
|
||||||
|
"Value":"Значение",
|
||||||
|
"Description":"Описание",
|
||||||
|
"Parameter Type":"Тип параметра",
|
||||||
|
"Data Type":"Тип данных",
|
||||||
|
"HTTP Status Code":"HTTP код",
|
||||||
|
"Reason":"Причина",
|
||||||
|
"Response Model":"Структура ответа",
|
||||||
|
"Request URL":"URL запроса",
|
||||||
|
"Response Body":"Тело ответа",
|
||||||
|
"Response Code":"HTTP код ответа",
|
||||||
|
"Response Headers":"Заголовки ответа",
|
||||||
|
"Hide Response":"Спрятать ответ",
|
||||||
|
"Response Messages":"Что может прийти в ответ",
|
||||||
|
"Try it out!":"Попробовать!",
|
||||||
|
"Show/Hide":"Показать/Скрыть",
|
||||||
|
"List Operations":"Операции кратко",
|
||||||
|
"Expand Operations":"Операции подробно",
|
||||||
|
"Raw":"В сыром виде",
|
||||||
|
"can't parse JSON. Raw result":"Не удается распарсить ответ:",
|
||||||
|
"Model Schema":"Структура",
|
||||||
|
"Model":"Описание",
|
||||||
|
"apply":"применить",
|
||||||
|
"Username":"Имя пользователя",
|
||||||
|
"Password":"Пароль",
|
||||||
|
"Terms of service":"Условия использования",
|
||||||
|
"Created by":"Разработано",
|
||||||
|
"See more at":"Еще тут",
|
||||||
|
"Contact the developer":"Связаться с разработчиком",
|
||||||
|
"api version":"Версия API",
|
||||||
|
"Response Content Type":"Content Type ответа",
|
||||||
|
"fetching resource":"Получение ресурса",
|
||||||
|
"fetching resource list":"Получение ресурсов",
|
||||||
|
"Explore":"Поехали",
|
||||||
|
"Show Swagger Petstore Example Apis":"Показать примеры АПИ",
|
||||||
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, какая-то лажа с настройками доступа",
|
||||||
|
"Please specify the protocol for":"Пожалуйста, укажите протогол для",
|
||||||
|
"Can't read swagger JSON from":"Не получается прочитать swagger json из",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",
|
||||||
|
"Unable to read api":"Не удалось прочитать api",
|
||||||
|
"from path":"по адресу",
|
||||||
|
"server returned":"сервер сказал"
|
||||||
|
});
|
||||||
38
lang/translator.js
Normal file
38
lang/translator.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translator for documentation pages.
|
||||||
|
*
|
||||||
|
* To enable translation you should include one of language-files in your index.html
|
||||||
|
* after <script src='lang/translator.js' type='text/javascript'></script>.
|
||||||
|
* For example - <script src='lang/ru.js' type='text/javascript'></script>
|
||||||
|
*
|
||||||
|
* If you wish to translate some new texsts you should do two things:
|
||||||
|
* 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
|
||||||
|
* 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.
|
||||||
|
* The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
window.SwaggerTranslator = {
|
||||||
|
|
||||||
|
_words:[],
|
||||||
|
|
||||||
|
translate: function() {
|
||||||
|
var $this = this;
|
||||||
|
|
||||||
|
$('[data-sw-translate]').each(function() {
|
||||||
|
$(this).html($this._tryTranslate($(this).html()));
|
||||||
|
|
||||||
|
$(this).val($this._tryTranslate($(this).val()));
|
||||||
|
$(this).attr('title', $this._tryTranslate($(this).attr('title')));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_tryTranslate: function(word) {
|
||||||
|
return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
|
||||||
|
},
|
||||||
|
|
||||||
|
learn: function(wordsMap) {
|
||||||
|
this._words = wordsMap;
|
||||||
|
}
|
||||||
|
};
|
||||||
13
package.json
13
package.json
@@ -1,14 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "swagger-ui",
|
"name": "swagger-ui",
|
||||||
"author": "Tony Tam <fehguy@gmail.com>",
|
"author": "Tony Tam <fehguy@gmail.com>",
|
||||||
"contributors": [{
|
"contributors": [
|
||||||
|
{
|
||||||
"name": "Mohsen Azimi",
|
"name": "Mohsen Azimi",
|
||||||
"email": "me@azimi.me"
|
"email": "me@azimi.me"
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||||
"version": "2.1.2-M2",
|
"version": "2.1.0",
|
||||||
"homepage": "http://swagger.io",
|
"homepage": "http://swagger.io",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
|
"main": "dist/swagger-ui.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp",
|
"build": "gulp",
|
||||||
"serve": "gulp serve",
|
"serve": "gulp serve",
|
||||||
@@ -35,6 +38,7 @@
|
|||||||
"gulp-declare": "^0.3.0",
|
"gulp-declare": "^0.3.0",
|
||||||
"gulp-handlebars": "^3.0.1",
|
"gulp-handlebars": "^3.0.1",
|
||||||
"gulp-header": "^1.2.2",
|
"gulp-header": "^1.2.2",
|
||||||
|
"gulp-jshint": "^1.10.0",
|
||||||
"gulp-less": "^3.0.1",
|
"gulp-less": "^3.0.1",
|
||||||
"gulp-order": "^1.1.1",
|
"gulp-order": "^1.1.1",
|
||||||
"gulp-rename": "^1.2.0",
|
"gulp-rename": "^1.2.0",
|
||||||
@@ -42,9 +46,10 @@
|
|||||||
"gulp-watch": "^4.1.1",
|
"gulp-watch": "^4.1.1",
|
||||||
"gulp-wrap": "^0.11.0",
|
"gulp-wrap": "^0.11.0",
|
||||||
"http-server": "git+https://github.com/nodeapps/http-server.git",
|
"http-server": "git+https://github.com/nodeapps/http-server.git",
|
||||||
|
"jshint-stylish": "^1.0.1",
|
||||||
"less": "^2.4.0",
|
"less": "^2.4.0",
|
||||||
"mocha": "^2.1.0",
|
"mocha": "^2.1.0",
|
||||||
"selenium-webdriver": "^2.45.0",
|
"selenium-webdriver": "^2.45.0",
|
||||||
"swagger-client": "2.1.2-M2"
|
"swagger-client": "2.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,6 +275,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap p.big,
|
.swagger-section .swagger-ui-wrap p.big,
|
||||||
.swagger-section .swagger-ui-wrap div.big p {
|
.swagger-section .swagger-ui-wrap div.big p {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@@ -424,6 +427,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -1074,6 +1088,9 @@
|
|||||||
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
.swagger-section .title {
|
.swagger-section .title {
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,6 +275,9 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap p.big,
|
.swagger-section .swagger-ui-wrap p.big,
|
||||||
.swagger-section .swagger-ui-wrap div.big p {
|
.swagger-section .swagger-ui-wrap div.big p {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@@ -424,6 +427,17 @@
|
|||||||
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px;
|
||||||
|
}
|
||||||
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
.swagger-section .swagger-ui-wrap .model-signature .propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -1074,6 +1088,9 @@
|
|||||||
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
.swagger-section .swagger-ui-wrap form.form_box p strong {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
.swagger-section .title {
|
.swagger-section .title {
|
||||||
font-style: bold;
|
font-style: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
250
src/main/html/css/style.css
Normal file
250
src/main/html/css/style.css
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
.swagger-section #header a#logo {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
background: transparent url(../images/logo.png) no-repeat left center;
|
||||||
|
padding: 20px 0 20px 40px;
|
||||||
|
}
|
||||||
|
#text-head {
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
float: right;
|
||||||
|
margin-right: 20%;
|
||||||
|
}
|
||||||
|
.navbar-fixed-top .navbar-nav {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-fixed-top .navbar-brand {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-header {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
.navbar-inverse {
|
||||||
|
background-color: #000;
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
#navbar-brand {
|
||||||
|
margin-left: 20%;
|
||||||
|
}
|
||||||
|
.navtext {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.h1,
|
||||||
|
h1 {
|
||||||
|
font-size: 60px;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-header .navbar-brand {
|
||||||
|
color: #a2dfee;
|
||||||
|
}
|
||||||
|
/* tag titles */
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
|
||||||
|
color: #393939;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
|
||||||
|
color: #525252;
|
||||||
|
padding-left: 0px;
|
||||||
|
display: block;
|
||||||
|
clear: none;
|
||||||
|
float: left;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.navbar-default .navbar-collapse,
|
||||||
|
.navbar-default .navbar-form {
|
||||||
|
border-color: #0A0A0A;
|
||||||
|
}
|
||||||
|
.container1 {
|
||||||
|
width: 1500px;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 0;
|
||||||
|
background-image: url('../images/shield.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: -40px -20px;
|
||||||
|
margin-bottom: 210px;
|
||||||
|
}
|
||||||
|
.container-inner {
|
||||||
|
width: 1200px;
|
||||||
|
margin: auto;
|
||||||
|
background-color: rgba(223, 227, 228, 0.75);
|
||||||
|
padding-bottom: 40px;
|
||||||
|
padding-top: 40px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
.header-content {
|
||||||
|
padding: 0;
|
||||||
|
width: 1000px;
|
||||||
|
}
|
||||||
|
.title1 {
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
color: #404040;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 40px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
#icon {
|
||||||
|
margin-top: -18px;
|
||||||
|
}
|
||||||
|
.subtext {
|
||||||
|
font-size: 25px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #08b;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 250px;
|
||||||
|
}
|
||||||
|
.bg-primary {
|
||||||
|
background-color: #00468b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:focus {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li > a,
|
||||||
|
.navbar-default .nav > li > a:focus:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.text-faded {
|
||||||
|
font-size: 25px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
}
|
||||||
|
.section-heading {
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 45px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
hr {
|
||||||
|
border-color: #00468b;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
.description {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 200px;
|
||||||
|
}
|
||||||
|
.description li {
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #525252;
|
||||||
|
margin-left: 28%;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
.gap {
|
||||||
|
margin-top: 200px;
|
||||||
|
}
|
||||||
|
.troubleshootingtext {
|
||||||
|
color: rgba(255, 255, 255, 0.7);
|
||||||
|
padding-left: 30%;
|
||||||
|
}
|
||||||
|
.troubleshootingtext li {
|
||||||
|
list-style-type: circle;
|
||||||
|
font-size: 25px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
.overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
.block.response_body.json:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.backdrop {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
#myModal {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.modal-backdrop {
|
||||||
|
bottom: 0;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
.curl {
|
||||||
|
padding: 10px;
|
||||||
|
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||||
|
font-size: 0.9em;
|
||||||
|
max-height: 400px;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: #fcf6db;
|
||||||
|
border: 1px solid #e5e0c6;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.curl_title {
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px 0 5px;
|
||||||
|
font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap h2 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
.markdown p {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap .code {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
.swagger-section .swagger-ui-wrap b {
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
#signin:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.navbar-right .dropdown-menu {
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
#signinbutton {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li .details {
|
||||||
|
color: #000000;
|
||||||
|
text-transform: none;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-style: italic;
|
||||||
|
line-height: 20px;
|
||||||
|
top: -2px;
|
||||||
|
}
|
||||||
|
.navbar-default .nav > li .details:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
#signout {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
||||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||||
<script src='lib/marked.js' type='text/javascript'></script>
|
<script src='lib/marked.js' type='text/javascript'></script>
|
||||||
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
@@ -36,13 +37,11 @@
|
|||||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
||||||
onComplete: function(swaggerApi, swaggerUi){
|
onComplete: function(swaggerApi, swaggerUi){
|
||||||
if(typeof initOAuth == "function") {
|
if(typeof initOAuth == "function") {
|
||||||
/*
|
|
||||||
initOAuth({
|
initOAuth({
|
||||||
clientId: "your-client-id",
|
clientId: "your-client-id",
|
||||||
realm: "your-realms",
|
realm: "your-realms",
|
||||||
appName: "your-app-name"
|
appName: "your-app-name"
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('pre code').each(function(i, e) {
|
$('pre code').each(function(i, e) {
|
||||||
@@ -55,8 +54,9 @@
|
|||||||
log("Unable to Load SwaggerUI");
|
log("Unable to Load SwaggerUI");
|
||||||
},
|
},
|
||||||
docExpansion: "none",
|
docExpansion: "none",
|
||||||
sorter : "alpha",
|
jsonEditor:true,
|
||||||
jsonEditor:true
|
apisSorter: "alpha",
|
||||||
|
showRequestHeaders: false
|
||||||
});
|
});
|
||||||
|
|
||||||
function addApiKeyAuthorization(){
|
function addApiKeyAuthorization(){
|
||||||
@@ -74,7 +74,6 @@
|
|||||||
/*
|
/*
|
||||||
var apiKey = "myApiKeyXXXX123456789";
|
var apiKey = "myApiKeyXXXX123456789";
|
||||||
$('#input_apiKey').val(apiKey);
|
$('#input_apiKey').val(apiKey);
|
||||||
addApiKeyAuthorization();
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.load();
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/*global JSONEditor*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
window.SwaggerUi = Backbone.Router.extend({
|
window.SwaggerUi = Backbone.Router.extend({
|
||||||
@@ -13,6 +14,9 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
// SwaggerUi accepts all the same options as SwaggerApi
|
// SwaggerUi accepts all the same options as SwaggerApi
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
if(!options.highlightSizeThreshold) {
|
||||||
|
options.highlightSizeThreshold = 100000;
|
||||||
|
}
|
||||||
|
|
||||||
// Allow dom_id to be overridden
|
// Allow dom_id to be overridden
|
||||||
if (options.dom_id) {
|
if (options.dom_id) {
|
||||||
@@ -97,7 +101,9 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
if (url && url.indexOf('http') !== 0) {
|
if (url && url.indexOf('http') !== 0) {
|
||||||
url = this.buildUrl(window.location.href.toString(), url);
|
url = this.buildUrl(window.location.href.toString(), url);
|
||||||
}
|
}
|
||||||
|
if(this.api) {
|
||||||
|
this.options.authorizations = this.api.clientAuthorizations.authz;
|
||||||
|
}
|
||||||
this.options.url = url;
|
this.options.url = url;
|
||||||
this.headerView.update(url);
|
this.headerView.update(url);
|
||||||
|
|
||||||
@@ -180,7 +186,7 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
}
|
}
|
||||||
$('#message-bar').removeClass('message-fail');
|
$('#message-bar').removeClass('message-fail');
|
||||||
$('#message-bar').addClass('message-success');
|
$('#message-bar').addClass('message-success');
|
||||||
$('#message-bar').html(data);
|
$('#message-bar').text(data);
|
||||||
},
|
},
|
||||||
|
|
||||||
// shows message in red
|
// shows message in red
|
||||||
@@ -191,7 +197,7 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
$('#message-bar').removeClass('message-success');
|
$('#message-bar').removeClass('message-success');
|
||||||
$('#message-bar').addClass('message-fail');
|
$('#message-bar').addClass('message-fail');
|
||||||
|
|
||||||
var val = $('#message-bar').html(data);
|
var val = $('#message-bar').text(data);
|
||||||
|
|
||||||
if (this.options.onFailure) {
|
if (this.options.onFailure) {
|
||||||
this.options.onFailure(data);
|
this.options.onFailure(data);
|
||||||
@@ -205,6 +211,10 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
$('.markdown').each(function(){
|
$('.markdown').each(function(){
|
||||||
$(this).html(marked($(this).html()));
|
$(this).html(marked($(this).html()));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.propDesc', '.model-signature .description').each(function () {
|
||||||
|
$(this).html(marked($(this).html())).addClass('markdown');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,11 +93,13 @@ window.Docs = {
|
|||||||
|
|
||||||
switch (fragments.length) {
|
switch (fragments.length) {
|
||||||
case 1:
|
case 1:
|
||||||
|
if (fragments[0].length > 0) { // prevent matching "#/"
|
||||||
// Expand all operations for the resource and scroll to it
|
// Expand all operations for the resource and scroll to it
|
||||||
var dom_id = 'resource_' + fragments[0];
|
var dom_id = 'resource_' + fragments[0];
|
||||||
|
|
||||||
Docs.expandEndpointListForResource(fragments[0]);
|
Docs.expandEndpointListForResource(fragments[0]);
|
||||||
$("#"+dom_id).slideto({highlight: false});
|
$("#"+dom_id).slideto({highlight: false});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// Refer to the endpoint DOM element, e.g. #words_get_search
|
// Refer to the endpoint DOM element, e.g. #words_get_search
|
||||||
|
|||||||
@@ -5,3 +5,36 @@ Handlebars.registerHelper('sanitize', function(html) {
|
|||||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||||
return new Handlebars.SafeString(html);
|
return new Handlebars.SafeString(html);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||||
|
var result, type = 'text', idAtt = '';
|
||||||
|
var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple;
|
||||||
|
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
|
||||||
|
|
||||||
|
if (typeof defaultValue === 'undefined') {
|
||||||
|
defaultValue = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(param.format && param.format === 'password') {
|
||||||
|
type = 'password';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(param.valueId) {
|
||||||
|
idAtt = ' id=\'' + param.valueId + '\'';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isArray) {
|
||||||
|
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt;
|
||||||
|
result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>';
|
||||||
|
result += defaultValue + '</textarea>';
|
||||||
|
} else {
|
||||||
|
var parameterClass = 'parameter';
|
||||||
|
if(param.required) {
|
||||||
|
parameterClass += ' required';
|
||||||
|
}
|
||||||
|
result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\'';
|
||||||
|
result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt;
|
||||||
|
result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>';
|
||||||
|
}
|
||||||
|
return new Handlebars.SafeString(result);
|
||||||
|
});
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ SwaggerUi.Views.ContentTypeView = Backbone.View.extend({
|
|||||||
initialize: function() {},
|
initialize: function() {},
|
||||||
|
|
||||||
render: function(){
|
render: function(){
|
||||||
|
this.model.contentTypeId = 'ct' + Math.random();
|
||||||
$(this.el).html(Handlebars.templates.content_type(this.model));
|
$(this.el).html(Handlebars.templates.content_type(this.model));
|
||||||
|
|
||||||
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
SwaggerUi.Views.HeaderView = Backbone.View.extend({
|
SwaggerUi.Views.HeaderView = Backbone.View.extend({
|
||||||
events: {
|
events: {
|
||||||
'click #show-pet-store-icon' : 'showPetStore',
|
'click #show-pet-store-icon' : 'showPetStore',
|
||||||
'click #show-wordnik-dev-icon' : 'showWordnikDev',
|
|
||||||
'click #explore' : 'showCustom',
|
'click #explore' : 'showCustom',
|
||||||
'keyup #input_baseUrl' : 'showCustomOnKeyup',
|
'keyup #input_baseUrl' : 'showCustomOnKeyup',
|
||||||
'keyup #input_apiKey' : 'showCustomOnKeyup'
|
'keyup #input_apiKey' : 'showCustomOnKeyup'
|
||||||
@@ -17,12 +16,6 @@ SwaggerUi.Views.HeaderView = Backbone.View.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
showWordnikDev: function(){
|
|
||||||
this.trigger('update-swagger-ui', {
|
|
||||||
url: 'http://api.wordnik.com/v4/resources.json'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
showCustomOnKeyup: function(e){
|
showCustomOnKeyup: function(e){
|
||||||
if (e.keyCode === 13) {
|
if (e.keyCode === 13) {
|
||||||
this.showCustom();
|
this.showCustom();
|
||||||
|
|||||||
@@ -54,21 +54,19 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.model.swaggerVersion === '2.0') {
|
|
||||||
if ('validatorUrl' in opts.swaggerOptions) {
|
if ('validatorUrl' in opts.swaggerOptions) {
|
||||||
|
|
||||||
// Validator URL specified explicitly
|
// Validator URL specified explicitly
|
||||||
this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
|
this.model.validatorUrl = opts.swaggerOptions.validatorUrl;
|
||||||
|
|
||||||
} else if (this.model.url.indexOf('localhost') > 0) {
|
} else if (this.model.url.indexOf('localhost') > 0) {
|
||||||
|
|
||||||
// Localhost override
|
// Localhost override
|
||||||
this.model.validatorUrl = null;
|
this.model.validatorUrl = null;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Default validator
|
// Default validator
|
||||||
this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
|
if(window.location.protocol === 'https') {
|
||||||
|
this.model.validatorUrl = 'https://online.swagger.io/validator';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.model.validatorUrl = 'http://online.swagger.io/validator';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +141,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
|||||||
auths: auths,
|
auths: auths,
|
||||||
swaggerOptions: this.options.swaggerOptions
|
swaggerOptions: this.options.swaggerOptions
|
||||||
});
|
});
|
||||||
$('#resources').append(resourceView.render().el);
|
$('#resources', this.el).append(resourceView.render().el);
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function(){
|
clear: function(){
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
'click .toggleOperation' : 'toggleOperationContent',
|
'click .toggleOperation' : 'toggleOperationContent',
|
||||||
'mouseenter .api-ic' : 'mouseEnter',
|
'mouseenter .api-ic' : 'mouseEnter',
|
||||||
'mouseout .api-ic' : 'mouseExit',
|
'mouseout .api-ic' : 'mouseExit',
|
||||||
|
'dblclick .curl' : 'selectText',
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function(opts) {
|
initialize: function(opts) {
|
||||||
@@ -22,6 +23,24 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectText: function(event) {
|
||||||
|
var doc = document,
|
||||||
|
text = event.target.firstChild,
|
||||||
|
range,
|
||||||
|
selection;
|
||||||
|
if (doc.body.createTextRange) {
|
||||||
|
range = document.body.createTextRange();
|
||||||
|
range.moveToElementText(text);
|
||||||
|
range.select();
|
||||||
|
} else if (window.getSelection) {
|
||||||
|
selection = window.getSelection();
|
||||||
|
range = document.createRange();
|
||||||
|
range.selectNodeContents(text);
|
||||||
|
selection.removeAllRanges();
|
||||||
|
selection.addRange(range);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
mouseEnter: function(e) {
|
mouseEnter: function(e) {
|
||||||
var elem = $(this.el).find('.content');
|
var elem = $(this.el).find('.content');
|
||||||
var x = e.pageX;
|
var x = e.pageX;
|
||||||
@@ -160,6 +179,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
signature: this.model.responseClassSignature
|
signature: this.model.responseClassSignature
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
var opts = this.options.swaggerOptions;
|
||||||
|
if (opts.showRequestHeaders) {
|
||||||
|
this.model.showRequestHeaders = true;
|
||||||
|
}
|
||||||
$(this.el).html(Handlebars.templates.operation(this.model));
|
$(this.el).html(Handlebars.templates.operation(this.model));
|
||||||
if (signatureModel) {
|
if (signatureModel) {
|
||||||
responseSignatureView = new SwaggerUi.Views.SignatureView({
|
responseSignatureView = new SwaggerUi.Views.SignatureView({
|
||||||
@@ -258,7 +281,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
// Note: copied from CoffeeScript compiled file
|
// Note: copied from CoffeeScript compiled file
|
||||||
// TODO: redactor
|
// TODO: redactor
|
||||||
submitOperation: function(e) {
|
submitOperation: function(e) {
|
||||||
var error_free, form, isFileUpload, l, len, len1, len2, m, map, n, o, opts, ref1, ref2, ref3, val;
|
var error_free, form, isFileUpload, map, opts;
|
||||||
if (e !== null) {
|
if (e !== null) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
@@ -292,36 +315,29 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
error_free = false;
|
error_free = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
form.find('select.required').each(function() {
|
||||||
|
$(this).removeClass('error');
|
||||||
|
if (this.selectedIndex === -1) {
|
||||||
|
$(this).addClass('error');
|
||||||
|
$(this).wiggle({
|
||||||
|
callback: (function(_this) {
|
||||||
|
return function() {
|
||||||
|
$(_this).focus();
|
||||||
|
};
|
||||||
|
})(this)
|
||||||
|
});
|
||||||
|
error_free = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
if (error_free) {
|
if (error_free) {
|
||||||
map = {};
|
map = this.getInputMap(form);
|
||||||
|
isFileUpload = this.isFileUpload(form);
|
||||||
opts = {
|
opts = {
|
||||||
parent: this
|
parent: this
|
||||||
};
|
};
|
||||||
isFileUpload = false;
|
if (this.options.swaggerOptions) {
|
||||||
ref1 = form.find('input');
|
for(var key in this.options.swaggerOptions) {
|
||||||
for (l = 0, len = ref1.length; l < len; l++) {
|
opts[key] = this.options.swaggerOptions[key];
|
||||||
o = ref1[l];
|
|
||||||
if ((o.value !== null) && jQuery.trim(o.value).length > 0) {
|
|
||||||
map[o.name] = o.value;
|
|
||||||
}
|
|
||||||
if (o.type === 'file') {
|
|
||||||
map[o.name] = o.files[0];
|
|
||||||
isFileUpload = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ref2 = form.find('textarea');
|
|
||||||
for (m = 0, len1 = ref2.length; m < len1; m++) {
|
|
||||||
o = ref2[m];
|
|
||||||
if ((o.value !== null) && jQuery.trim(o.value).length > 0) {
|
|
||||||
map[o.name] = o.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ref3 = form.find('select');
|
|
||||||
for (n = 0, len2 = ref3.length; n < len2; n++) {
|
|
||||||
o = ref3[n];
|
|
||||||
val = this.getSelectedValue(o);
|
|
||||||
if ((val !== null) && jQuery.trim(val).length > 0) {
|
|
||||||
map[o.name] = val;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,90 +354,70 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
opts.requestContentType = $('div select[name=parameterContentType]', $(this.el)).val();
|
opts.requestContentType = $('div select[name=parameterContentType]', $(this.el)).val();
|
||||||
$('.response_throbber', $(this.el)).show();
|
$('.response_throbber', $(this.el)).show();
|
||||||
if (isFileUpload) {
|
if (isFileUpload) {
|
||||||
return this.handleFileUpload(map, form);
|
$('.request_url', $(this.el)).html('<pre></pre>');
|
||||||
|
$('.request_url pre', $(this.el)).text(this.invocationUrl);
|
||||||
|
|
||||||
|
opts.useJQuery = true;
|
||||||
|
map.parameterContentType = 'multipart/form-data';
|
||||||
|
|
||||||
|
return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);
|
||||||
} else {
|
} else {
|
||||||
return this.model['do'](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
|
this.map = map;
|
||||||
|
return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInputMap: function (form) {
|
||||||
|
var map, ref1, l, len, o, ref2, m, len1, val, ref3, n, len2;
|
||||||
|
map = {};
|
||||||
|
ref1 = form.find('input');
|
||||||
|
for (l = 0, len = ref1.length; l < len; l++) {
|
||||||
|
o = ref1[l];
|
||||||
|
if ((o.value !== null) && jQuery.trim(o.value).length > 0) {
|
||||||
|
map[o.name] = o.value;
|
||||||
|
}
|
||||||
|
if (o.type === 'file') {
|
||||||
|
map[o.name] = o.files[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ref2 = form.find('textarea');
|
||||||
|
for (m = 0, len1 = ref2.length; m < len1; m++) {
|
||||||
|
o = ref2[m];
|
||||||
|
val = this.getTextAreaValue(o);
|
||||||
|
if ((val !== null) && jQuery.trim(val).length > 0) {
|
||||||
|
map[o.name] = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ref3 = form.find('select');
|
||||||
|
for (n = 0, len2 = ref3.length; n < len2; n++) {
|
||||||
|
o = ref3[n];
|
||||||
|
val = this.getSelectedValue(o);
|
||||||
|
if ((val !== null) && jQuery.trim(val).length > 0) {
|
||||||
|
map[o.name] = val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
},
|
||||||
|
|
||||||
|
isFileUpload: function (form) {
|
||||||
|
var ref1, l, len, o;
|
||||||
|
var isFileUpload = false;
|
||||||
|
ref1 = form.find('input');
|
||||||
|
for (l = 0, len = ref1.length; l < len; l++) {
|
||||||
|
o = ref1[l];
|
||||||
|
if (o.type === 'file') {
|
||||||
|
isFileUpload = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return isFileUpload;
|
||||||
|
},
|
||||||
|
|
||||||
success: function(response, parent) {
|
success: function(response, parent) {
|
||||||
parent.showCompleteStatus(response);
|
parent.showCompleteStatus(response);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Note: This is compiled code
|
|
||||||
// TODO: Refactor
|
|
||||||
handleFileUpload: function(map, form) {
|
|
||||||
var bodyParam, el, headerParams, l, len, len1, len2, len3, m, n, o, p, param, params, ref1, ref2, ref3, ref4;
|
|
||||||
ref1 = form.serializeArray();
|
|
||||||
for (l = 0, len = ref1.length; l < len; l++) {
|
|
||||||
o = ref1[l];
|
|
||||||
if ((o.value !== null) && jQuery.trim(o.value).length > 0) {
|
|
||||||
map[o.name] = o.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bodyParam = new FormData();
|
|
||||||
params = 0;
|
|
||||||
ref2 = this.model.parameters;
|
|
||||||
for (m = 0, len1 = ref2.length; m < len1; m++) {
|
|
||||||
param = ref2[m];
|
|
||||||
if (param.paramType === 'form' || param['in'] === 'formData') {
|
|
||||||
if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) {
|
|
||||||
bodyParam.append(param.name, map[param.name]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
headerParams = {};
|
|
||||||
ref3 = this.model.parameters;
|
|
||||||
for (n = 0, len2 = ref3.length; n < len2; n++) {
|
|
||||||
param = ref3[n];
|
|
||||||
if (param.paramType === 'header') {
|
|
||||||
headerParams[param.name] = map[param.name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ref4 = form.find('input[type~="file"]');
|
|
||||||
for (p = 0, len3 = ref4.length; p < len3; p++) {
|
|
||||||
el = ref4[p];
|
|
||||||
if (typeof el.files[0] !== 'undefined') {
|
|
||||||
bodyParam.append($(el).attr('name'), el.files[0]);
|
|
||||||
params += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), delete headerParams['Content-Type'], this.model.urlify(map, false)) : this.model.urlify(map, true);
|
|
||||||
$('.request_url', $(this.el)).html('<pre></pre>');
|
|
||||||
$('.request_url pre', $(this.el)).text(this.invocationUrl);
|
|
||||||
|
|
||||||
// TODO: don't use jQuery. Use SwaggerJS for handling the call.
|
|
||||||
var obj = {
|
|
||||||
type: this.model.method,
|
|
||||||
url: this.invocationUrl,
|
|
||||||
headers: headerParams,
|
|
||||||
data: bodyParam,
|
|
||||||
dataType: 'json',
|
|
||||||
contentType: false,
|
|
||||||
processData: false,
|
|
||||||
error: (function(_this) {
|
|
||||||
return function(data) {
|
|
||||||
return _this.showErrorStatus(_this.wrap(data), _this);
|
|
||||||
};
|
|
||||||
})(this),
|
|
||||||
success: (function(_this) {
|
|
||||||
return function(data) {
|
|
||||||
return _this.showResponse(data, _this);
|
|
||||||
};
|
|
||||||
})(this),
|
|
||||||
complete: (function(_this) {
|
|
||||||
return function(data) {
|
|
||||||
return _this.showCompleteStatus(_this.wrap(data), _this);
|
|
||||||
};
|
|
||||||
})(this)
|
|
||||||
};
|
|
||||||
jQuery.ajax(obj);
|
|
||||||
return false;
|
|
||||||
// end of file-upload nastiness
|
|
||||||
},
|
|
||||||
// wraps a jquery response as a shred response
|
// wraps a jquery response as a shred response
|
||||||
|
|
||||||
wrap: function(data) {
|
wrap: function(data) {
|
||||||
var h, headerArray, headers, i, l, len, o;
|
var h, headerArray, headers, i, l, len, o;
|
||||||
headers = {};
|
headers = {};
|
||||||
@@ -576,6 +572,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
url = response.request.url;
|
url = response.request.url;
|
||||||
}
|
}
|
||||||
var headers = response.headers;
|
var headers = response.headers;
|
||||||
|
content = jQuery.trim(content);
|
||||||
|
|
||||||
// if server is nice, and sends content-type back, we can use it
|
// if server is nice, and sends content-type back, we can use it
|
||||||
var contentType = null;
|
var contentType = null;
|
||||||
@@ -635,10 +632,10 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
||||||
|
|
||||||
// Download
|
// Download
|
||||||
} else if (headers['Content-Disposition'].test(/attachment/) ||
|
} else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
|
||||||
headers['content-disposition'].test(/attachment/) ||
|
headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
|
||||||
headers['Content-Description'].test(/File Transfer/) ||
|
headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
|
||||||
headers['content-description'].test(/File Transfer/)) {
|
headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
|
||||||
|
|
||||||
if ('Blob' in window) {
|
if ('Blob' in window) {
|
||||||
var type = contentType || 'text/html';
|
var type = contentType || 'text/html';
|
||||||
@@ -675,23 +672,74 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
$('.response', $(this.el)).slideDown();
|
$('.response', $(this.el)).slideDown();
|
||||||
$('.response_hider', $(this.el)).show();
|
$('.response_hider', $(this.el)).show();
|
||||||
$('.response_throbber', $(this.el)).hide();
|
$('.response_throbber', $(this.el)).hide();
|
||||||
var response_body_el = $('.response_body', $(this.el))[0];
|
|
||||||
|
|
||||||
|
//adds curl output
|
||||||
|
var curlCommand = this.model.asCurl(this.map);
|
||||||
|
curlCommand = curlCommand.replace('!', '!');
|
||||||
|
$( '.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
|
||||||
|
|
||||||
// only highlight the response if response is less than threshold, default state is highlight response
|
// only highlight the response if response is less than threshold, default state is highlight response
|
||||||
var opts = this.options.swaggerOptions;
|
var opts = this.options.swaggerOptions;
|
||||||
if (opts.highlightSizeThreshold && response.data.length > opts.highlightSizeThreshold) {
|
|
||||||
|
if (opts.showRequestHeaders) {
|
||||||
|
var form = $('.sandbox', $(this.el)),
|
||||||
|
map = this.getInputMap(form),
|
||||||
|
requestHeaders = this.model.getHeaderParams(map);
|
||||||
|
delete requestHeaders['Content-Type'];
|
||||||
|
$('.request_headers', $(this.el)).html('<pre>' + _.escape(JSON.stringify(requestHeaders, null, ' ')).replace(/\n/g, '<br>') + '</pre>');
|
||||||
|
}
|
||||||
|
|
||||||
|
var response_body_el = $('.response_body', $(this.el))[0];
|
||||||
|
// only highlight the response if response is less than threshold, default state is highlight response
|
||||||
|
if (opts.highlightSizeThreshold && typeof response.data !== 'undefined' && response.data.length > opts.highlightSizeThreshold) {
|
||||||
return response_body_el;
|
return response_body_el;
|
||||||
} else {
|
} else {
|
||||||
return hljs.highlightBlock(response_body_el);
|
return hljs.highlightBlock(response_body_el);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleOperationContent: function() {
|
toggleOperationContent: function (event) {
|
||||||
var elem = $('#' + Docs.escapeResourceName(this.parentId + '_' + this.nickname + '_content'));
|
var elem = $('#' + Docs.escapeResourceName(this.parentId + '_' + this.nickname + '_content'));
|
||||||
if (elem.is(':visible')){
|
if (elem.is(':visible')){
|
||||||
|
event.preventDefault();
|
||||||
|
$.bbq.pushState('#/', 2);
|
||||||
Docs.collapseOperation(elem);
|
Docs.collapseOperation(elem);
|
||||||
} else {
|
} else {
|
||||||
Docs.expandOperation(elem);
|
Docs.expandOperation(elem);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getTextAreaValue: function(textArea) {
|
||||||
|
var param, parsed, result, i;
|
||||||
|
if (textArea.value === null || jQuery.trim(textArea.value).length === 0) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
param = this.getParamByName(textArea.name);
|
||||||
|
if (param && param.type && param.type.toLowerCase() === 'array') {
|
||||||
|
parsed = textArea.value.split('\n');
|
||||||
|
result = [];
|
||||||
|
for (i = 0; i < parsed.length; i++) {
|
||||||
|
if (parsed[i] !== null && jQuery.trim(parsed[i]).length > 0) {
|
||||||
|
result.push(parsed[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.length > 0 ? result : null;
|
||||||
|
} else {
|
||||||
|
return textArea.value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getParamByName: function(name) {
|
||||||
|
var i;
|
||||||
|
if (this.model.parameters) {
|
||||||
|
for(i = 0; i < this.model.parameters.length; i++) {
|
||||||
|
if (this.model.parameters[i].name === name) {
|
||||||
|
return this.model.parameters[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({
|
|||||||
initialize: function () {},
|
initialize: function () {},
|
||||||
|
|
||||||
render: function(){
|
render: function(){
|
||||||
|
this.model.parameterContentTypeId = 'pct' + Math.random();
|
||||||
$(this.el).html(Handlebars.templates.parameter_content_type(this.model));
|
$(this.el).html(Handlebars.templates.parameter_content_type(this.model));
|
||||||
|
|
||||||
$('label[for=parameterContentType]', $(this.el)).text('Parameter content type:');
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
|||||||
initialize: function(){
|
initialize: function(){
|
||||||
Handlebars.registerHelper('isArray', function(param, opts) {
|
Handlebars.registerHelper('isArray', function(param, opts) {
|
||||||
if (param.type.toLowerCase() === 'array' || param.allowMultiple) {
|
if (param.type.toLowerCase() === 'array' || param.allowMultiple) {
|
||||||
opts.fn(this);
|
return opts.fn(this);
|
||||||
} else {
|
} else {
|
||||||
opts.inverse(this);
|
return opts.inverse(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -30,7 +30,14 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
|||||||
this.model.paramType = this.model.in || this.model.paramType;
|
this.model.paramType = this.model.in || this.model.paramType;
|
||||||
this.model.isBody = this.model.paramType === 'body' || this.model.in === 'body';
|
this.model.isBody = this.model.paramType === 'body' || this.model.in === 'body';
|
||||||
this.model.isFile = type && type.toLowerCase() === 'file';
|
this.model.isFile = type && type.toLowerCase() === 'file';
|
||||||
this.model.default = (this.model.default || this.model.defaultValue);
|
|
||||||
|
// Allow for default === false
|
||||||
|
if(typeof this.model.default === 'undefined') {
|
||||||
|
this.model.default = this.model.defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.hasDefault = (typeof this.model.default !== 'undefined');
|
||||||
|
this.model.valueId = 'm' + this.model.name + Math.random();
|
||||||
|
|
||||||
if (this.model.allowableValues) {
|
if (this.model.allowableValues) {
|
||||||
this.model.isList = true;
|
this.model.isList = true;
|
||||||
|
|||||||
@@ -4,10 +4,8 @@ SwaggerUi.Views.ResponseContentTypeView = Backbone.View.extend({
|
|||||||
initialize: function(){},
|
initialize: function(){},
|
||||||
|
|
||||||
render: function(){
|
render: function(){
|
||||||
|
this.model.responseContentTypeId = 'rct' + Math.random();
|
||||||
$(this.el).html(Handlebars.templates.response_content_type(this.model));
|
$(this.el).html(Handlebars.templates.response_content_type(this.model));
|
||||||
|
|
||||||
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -153,6 +153,10 @@
|
|||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
p.big, div.big p {
|
p.big, div.big p {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
@@ -317,6 +321,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.propDesc.markdown {
|
||||||
|
> p:first-child,
|
||||||
|
> p:last-child {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
> p:not(:first-child):before {
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span:last-of-type.propDesc.markdown > p:only-child {
|
||||||
|
margin-right: -3px; // otherwise there is a gap before the comma
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.propName {
|
.propName {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -1089,6 +1106,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.operation-status td.markdown > p:last-child {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
311
src/main/less/style.less
Normal file
311
src/main/less/style.less
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
|
||||||
|
|
||||||
|
.swagger-section #header a#logo {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: none;
|
||||||
|
background: transparent url(../images/logo.png) no-repeat left center;
|
||||||
|
padding: 20px 0 20px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#text-head{
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Roboto', sans-serif;
|
||||||
|
color: #ffffff;
|
||||||
|
float: right;
|
||||||
|
margin-right: 20%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-fixed-top .navbar-nav {
|
||||||
|
height:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-fixed-top .navbar-brand {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-header {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-inverse {
|
||||||
|
background-color: #000;
|
||||||
|
border-color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navbar-brand {
|
||||||
|
margin-left: 20%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.navtext {
|
||||||
|
font-size: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.h1, h1 {
|
||||||
|
font-size: 60px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.navbar-default .navbar-header .navbar-brand {
|
||||||
|
color: #a2dfee;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tag titles */
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
|
||||||
|
color: #393939;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-size: 1.5em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
|
||||||
|
color: #525252;
|
||||||
|
padding-left: 0px;
|
||||||
|
display: block;
|
||||||
|
clear: none;
|
||||||
|
float: left;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-collapse, .navbar-default .navbar-form {
|
||||||
|
border-color: #0A0A0A;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container1 {
|
||||||
|
width: 1500px;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 0;
|
||||||
|
background-image: url('../images/shield.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: -40px -20px;
|
||||||
|
margin-bottom: 210px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-inner {
|
||||||
|
width: 1200px;
|
||||||
|
margin: auto;
|
||||||
|
background-color: rgba(223,227,228, 0.75);
|
||||||
|
padding-bottom: 40px;
|
||||||
|
padding-top: 40px;
|
||||||
|
border-radius: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-content {
|
||||||
|
padding: 0;
|
||||||
|
width: 1000px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.title1 {
|
||||||
|
font-size: 80px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
color: #404040;
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 40px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#icon {
|
||||||
|
margin-top: -18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtext{
|
||||||
|
font-size: 25px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #08b;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-fluid {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-primary {
|
||||||
|
background-color: #00468b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .nav > li>a, .navbar-default .nav>li>a:focus {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .nav > li>a, .navbar-default .nav>li>a:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .nav > li>a, .navbar-default .nav>li>a:focus:hover {
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-faded {
|
||||||
|
font-size: 25px;
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-heading{
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 45px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border-color: #00468b;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 200px;
|
||||||
|
}
|
||||||
|
.description li {
|
||||||
|
font-family: 'Vollkorn', serif;
|
||||||
|
font-size: 25px;
|
||||||
|
color: #525252;
|
||||||
|
margin-left: 28%;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap {
|
||||||
|
margin-top: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.troubleshootingtext {
|
||||||
|
color: rgba(255,255,255,.7);
|
||||||
|
padding-left: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.troubleshootingtext li {
|
||||||
|
list-style-type: circle;
|
||||||
|
font-size: 25px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay {
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
z-index:1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block.response_body.json:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backdrop {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
#myModal {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-backdrop {
|
||||||
|
bottom: 0;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.curl {
|
||||||
|
padding: 10px;
|
||||||
|
font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||||
|
font-size: 0.9em;
|
||||||
|
max-height: 400px;
|
||||||
|
margin-top: 5px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: #fcf6db;
|
||||||
|
border: 1px solid #e5e0c6;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.curl_title {
|
||||||
|
font-size: 1.1em;
|
||||||
|
margin: 0;
|
||||||
|
padding: 15px 0 5px;
|
||||||
|
font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-section .swagger-ui-wrap h2 {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown p {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo', serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-section .swagger-ui-wrap .code {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: 'Arvo',serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swagger-section .swagger-ui-wrap b {
|
||||||
|
font-family: 'Arvo',serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#signin:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-right .dropdown-menu {
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#signinbutton {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .nav > li .details {
|
||||||
|
color: #000000;
|
||||||
|
text-transform: none;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-style: italic;
|
||||||
|
line-height: 20px;
|
||||||
|
top: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .nav > li .details:hover {
|
||||||
|
color: black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#signout {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #08b;
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->
|
<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->
|
||||||
<div class='auth_container' id='apikey_container'>
|
<div class='auth_container' id='apikey_container'>
|
||||||
<div class='key_input_container'>
|
<div class='key_input_container'>
|
||||||
<div class='auth_label'>{{keyName}}</div>
|
<div class='auth_label'><label for='input_apiKey_entry'>{{keyName}}</label></div>
|
||||||
<input placeholder="api_key" class="auth_input" id="input_apiKey_entry" name="apiKey" type="text"/>
|
<input placeholder='api_key' class='auth_input' id='input_apiKey_entry' name='apiKey' type='text'/>
|
||||||
<div class='auth_submit'><a class='auth_submit_button' id="apply_api_key" href="#">apply</a></div>
|
<div class='auth_submit'><a class='auth_submit_button' id='apply_api_key' href='#''>apply</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>
|
<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>
|
||||||
<div class='auth_container' id='basic_auth_container'>
|
<div class='auth_container' id='basic_auth_container'>
|
||||||
<div class='key_input_container'>
|
<div class='key_input_container'>
|
||||||
<div class="auth_label">Username</div>
|
<div class="auth_label"><label for="input_username">Username</label></div>
|
||||||
<input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>
|
<input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>
|
||||||
<div class="auth_label">Password</div>
|
<div class="auth_label"><label for="password">Password</label></div>
|
||||||
<input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>
|
<input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>
|
||||||
<div class='auth_submit'><a class='auth_submit_button' id="apply_basic_auth" href="#">apply</a></div>
|
<div class='auth_submit'><a class='auth_submit_button' id="apply_basic_auth" href="#">apply</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<label for="contentType"></label>
|
<label for="{{contentTypeId}}">Response Content Type</label>
|
||||||
<select name="contentType">
|
<select name="contentType" id="{{contentTypeId}}">
|
||||||
{{#if produces}}
|
{{#if produces}}
|
||||||
{{#each produces}}
|
{{#each produces}}
|
||||||
<option value="{{{this}}}">{{{this}}}</option>
|
<option value="{{{this}}}">{{{this}}}</option>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<div class="info_title">{{info.title}}</div>
|
<div class="info_title">{{info.title}}</div>
|
||||||
<div class="info_description markdown">{{{info.description}}}</div>
|
<div class="info_description markdown">{{{info.description}}}</div>
|
||||||
{{#if externalDocs}}
|
{{#if externalDocs}}
|
||||||
<h5>More documentations</h5>
|
|
||||||
<p>{{externalDocs.description}}</p>
|
<p>{{externalDocs.description}}</p>
|
||||||
<a href="{{externalDocs.url}}" target="_blank">{{externalDocs.url}}</a>
|
<a href="{{externalDocs.url}}" target="_blank">{{externalDocs.url}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -18,8 +17,6 @@
|
|||||||
<ul id='resources'></ul>
|
<ul id='resources'></ul>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<h4 style="color: #999">[ <span style="font-variant: small-caps">base url</span>: {{basePath}}
|
<h4 style="color: #999">[ <span style="font-variant: small-caps">base url</span>: {{basePath}}
|
||||||
{{#if info.version}}
|
{{#if info.version}}
|
||||||
, <span style="font-variant: small-caps">api version</span>: {{info.version}}
|
, <span style="font-variant: small-caps">api version</span>: {{info.version}}
|
||||||
|
|||||||
@@ -85,15 +85,21 @@
|
|||||||
{{#if isReadOnly}}
|
{{#if isReadOnly}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='sandbox_header'>
|
<div class='sandbox_header'>
|
||||||
<input class='submit' name='commit' type='button' value='Try it out!' />
|
<input class='submit' type='button' value='Try it out!' />
|
||||||
<a href='#' class='response_hider' style='display:none'>Hide Response</a>
|
<a href='#' class='response_hider' style='display:none'>Hide Response</a>
|
||||||
<span class='response_throbber' style='display:none'></span>
|
<span class='response_throbber' style='display:none'></span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</form>
|
</form>
|
||||||
<div class='response' style='display:none'>
|
<div class='response' style='display:none'>
|
||||||
|
<h4>Curl</h4>
|
||||||
|
<div class='block curl'></div>
|
||||||
<h4>Request URL</h4>
|
<h4>Request URL</h4>
|
||||||
<div class='block request_url'></div>
|
<div class='block request_url'></div>
|
||||||
|
{{#if showRequestHeaders}}
|
||||||
|
<h4>Request Headers</h4>
|
||||||
|
<div class='block request_headers'></div>
|
||||||
|
{{/if}}
|
||||||
<h4>Response Body</h4>
|
<h4>Response Body</h4>
|
||||||
<div class='block response_body'></div>
|
<div class='block response_body'></div>
|
||||||
<h4>Response Code</h4>
|
<h4>Response Code</h4>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<td class='code'>{{name}}</td>
|
<td class='code'><label for='{{valueId}}'>{{name}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
{{#if isBody}}
|
{{#if isBody}}
|
||||||
{{#if isFile}}
|
{{#if isFile}}
|
||||||
<input type="file" name='{{name}}'/>
|
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#if default}}
|
||||||
<div class="editor_holder"></div>
|
<div class="editor_holder"></div>
|
||||||
<textarea class='body-textarea' name='{{name}}'>{{default}}</textarea>
|
<textarea class='body-textarea' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||||
<br />
|
<br />
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
{{else}}
|
{{else}}
|
||||||
<textarea class='body-textarea' name='{{name}}'></textarea>
|
<textarea class='body-textarea' name='{{name}}' id='{{valueId}}'></textarea>
|
||||||
<div class="editor_holder"></div>
|
<div class="editor_holder"></div>
|
||||||
<br />
|
<br />
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
@@ -20,14 +20,11 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if isFile}}
|
{{#if isFile}}
|
||||||
<input type="file" name='{{name}}'/>
|
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#renderTextParam this}}
|
||||||
<input class='parameter' minlength='0' name='{{name}}' placeholder='' type='text' value='{{default}}'/>
|
{{/renderTextParam}}
|
||||||
{{else}}
|
|
||||||
<input class='parameter' minlength='0' name='{{name}}' placeholder='' type='text' value=''/>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
{{#if required}}
|
<td class='code{{#if required}} required{{/if}}'><label for='{{valueId}}'>{{name}}</labe></td>
|
||||||
<td class='code required'>{{name}}</td>
|
|
||||||
{{/if}}
|
|
||||||
<td class='code'>{{name}}</td>
|
|
||||||
<td>
|
<td>
|
||||||
<select {{#isArray this}} multiple='multiple'{{/isArray}} class='parameter' name='{{name}}'>
|
<select {{#isArray this}} multiple="multiple"{{/isArray}} class="parameter {{#if required}} required {{/if}}" name="{{name}}" id="{{valueId}}">
|
||||||
{{#if required}}
|
|
||||||
{{else}}
|
{{#unless required}}
|
||||||
{{#if default}}
|
<option {{#unless hasDefault}} selected="" {{/unless}} value=''></option>
|
||||||
{{else}}
|
{{/unless}}
|
||||||
{{#isArray this}}
|
|
||||||
{{else}}
|
|
||||||
<option selected="" value=''></option>
|
|
||||||
{{/isArray}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
|
||||||
{{#each allowableValues.descriptiveValues}}
|
{{#each allowableValues.descriptiveValues}}
|
||||||
{{#if isDefault}}
|
|
||||||
<option selected="" value='{{value}}'>{{value}} (default)</option>
|
<option {{#if isDefault}} selected="" {{/if}} value='{{value}}'> {{value}} {{#if isDefault}} (default) {{/if}} </option>
|
||||||
{{else}}
|
|
||||||
<option value='{{value}}'>{{value}}</option>
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td class="markdown">{{{description}}}</td>
|
<td class="markdown">{{#if required}}<strong>{{/if}}{{{description}}}{{#if required}}</strong>{{/if}}</td>
|
||||||
<td>{{{paramType}}}</td>
|
<td>{{{paramType}}}</td>
|
||||||
<td><span class="model-signature"></span></td>
|
<td><span class="model-signature"></span></td>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<td class='code'>{{name}}</td>
|
<td class='code'><label for='{{valueId}}'>{{name}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{#if isBody}}
|
{{#if isBody}}
|
||||||
<textarea class='body-textarea' readonly='readonly' name='{{name}}'>{{default}}</textarea>
|
<textarea class='body-textarea' readonly='readonly' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#if default}}
|
||||||
{{default}}
|
{{default}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<td class='code required'>{{name}}</td>
|
<td class='code required'><label for='{{valueId}}'>{{name}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{#if isBody}}
|
{{#if isBody}}
|
||||||
<textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='{{name}}'>{{default}}</textarea>
|
<textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='{{name}}' id='{{valueId}}'>{{default}}</textarea>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#if default}}
|
||||||
{{default}}
|
{{default}}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<td class='code required'>{{name}}</td>
|
<td class='code required'><label for='{{valueId}}'>{{name}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{#if isBody}}
|
{{#if isBody}}
|
||||||
{{#if isFile}}
|
{{#if isFile}}
|
||||||
<input type="file" name='{{name}}'/>
|
<input type="file" name='{{name}}' id='{{valueId}}'/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#if default}}
|
||||||
<div class="editor_holder"></div>
|
<div class="editor_holder"></div>
|
||||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}'>{{default}}</textarea>
|
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}' id="{{valueId}}">{{default}}</textarea>
|
||||||
<br />
|
<br />
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
{{else}}
|
{{else}}
|
||||||
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}'></textarea>
|
<textarea class='body-textarea required' placeholder='(required)' name='{{name}}' id='{{valueId}}'></textarea>
|
||||||
<div class="editor_holder"></div>
|
<div class="editor_holder"></div>
|
||||||
<br />
|
<br />
|
||||||
<div class="parameter-content-type" />
|
<div class="parameter-content-type" />
|
||||||
@@ -18,13 +18,10 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if isFile}}
|
{{#if isFile}}
|
||||||
<input class='parameter' class='required' type='file' name='{{name}}'/>
|
<input class='parameter' class='required' type='file' name='{{name}}' id='{{valueId}}'/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if default}}
|
{{#renderTextParam this}}
|
||||||
<input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value='{{default}}'/>
|
{{/renderTextParam}}
|
||||||
{{else}}
|
|
||||||
<input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value=''/>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<label for="parameterContentType"></label>
|
<label for="{{parameterContentTypeId}}">Parameter content type:</label>
|
||||||
<select name="parameterContentType">
|
<select name="parameterContentType" id="{{parameterContentTypeId}}">
|
||||||
{{#if consumes}}
|
{{#if consumes}}
|
||||||
{{#each consumes}}
|
{{#each consumes}}
|
||||||
<option value="{{{this}}}">{{{this}}}</option>
|
<option value="{{{this}}}">{{{this}}}</option>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<label for="responseContentType"></label>
|
<label for="{{responseContentTypeId}}">Response Content Type</label>
|
||||||
<select name="responseContentType">
|
<select name="responseContentType" id="{{responseContentTypeId}}">
|
||||||
{{#if produces}}
|
{{#if produces}}
|
||||||
{{#each produces}}
|
{{#each produces}}
|
||||||
<option value="{{{this}}}">{{{this}}}</option>
|
<option value="{{{this}}}">{{{this}}}</option>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<td width='15%' class='code'>{{code}}</td>
|
<td width='15%' class='code'>{{code}}</td>
|
||||||
<td>{{{message}}}</td>
|
<td class="markdown">{{{message}}}</td>
|
||||||
<td width='50%'><span class="model-signature" /></td>
|
<td width='50%'><span class="model-signature" /></td>
|
||||||
<td class="headers">
|
<td class="headers">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
"info": {
|
"info": {
|
||||||
"title": "Swagger Sample App",
|
"title": "Swagger Sample App",
|
||||||
"description": "This is a sample server Petstore server. You can find out more about Swagger \n at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
|
"description": "This is a sample server Petstore server. You can find out more about Swagger \n at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
|
||||||
"termsOfServiceUrl": "http://helloreverb.com/terms/",
|
"termsOfServiceUrl": "http://swagger.io/terms/",
|
||||||
"contact": "apiteam@swagger.io",
|
"contact": "apiteam@swagger.io",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
|
"description": "This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"title": "Swagger Petstore",
|
"title": "Swagger Petstore",
|
||||||
"termsOfService": "http://helloreverb.com/terms/",
|
"termsOfService": "http://swagger.io/terms/",
|
||||||
"contact": {
|
"contact": {
|
||||||
"url": "http://swagger.io",
|
"url": "http://swagger.io",
|
||||||
"name": "Your pals at Swagger",
|
"name": "Your pals at Swagger",
|
||||||
@@ -594,7 +594,8 @@
|
|||||||
"name": "password",
|
"name": "password",
|
||||||
"description": "The password for login in clear text",
|
"description": "The password for login in clear text",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"format": "password"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|||||||
Reference in New Issue
Block a user