Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49a1169878 | ||
|
|
83468e64a2 | ||
|
|
20aa9643d3 | ||
|
|
7e426ac0cd | ||
|
|
5d75d7d7af | ||
|
|
65d81745ed | ||
|
|
30f0848ac2 | ||
|
|
da7ec89471 | ||
|
|
4885a8abdb | ||
|
|
47ab2a32c0 | ||
|
|
46fbae2f4f | ||
|
|
edeba22a2a | ||
|
|
2cd11efa9d | ||
|
|
81e897a07a | ||
|
|
a63dc0c51b | ||
|
|
bf60526e63 | ||
|
|
7166ba7802 | ||
|
|
1f2a5d7dd7 | ||
|
|
fede96b7b2 | ||
|
|
3fb29ecc61 | ||
|
|
d9b3db4399 | ||
|
|
552865aa0d | ||
|
|
73e2cd2179 | ||
|
|
d1539a7c4f | ||
|
|
81bf447ef4 | ||
|
|
2ad57cab6b | ||
|
|
e506c5bdb8 | ||
|
|
6a27140165 | ||
|
|
2e3304c16f | ||
|
|
66f3c369fa | ||
|
|
855b6c3170 | ||
|
|
e098b3a522 | ||
|
|
7878cea369 | ||
|
|
08b283cb0c | ||
|
|
87ef5c1f72 | ||
|
|
36af368a8c | ||
|
|
e9ab52f7b5 | ||
|
|
f5a0db2078 | ||
|
|
b4acbbb57e | ||
|
|
f92d6ddd55 | ||
|
|
7d37b75c32 | ||
|
|
2cbe939412 | ||
|
|
f7424a7009 | ||
|
|
f50851913e | ||
|
|
e3d5ad2595 | ||
|
|
656808b20c | ||
|
|
9fee08daa3 | ||
|
|
cf96414f78 | ||
|
|
80e548df0a | ||
|
|
4bdaeba797 | ||
|
|
15f76ad355 | ||
|
|
f321c62edc | ||
|
|
1a98574c03 | ||
|
|
1ce3dada00 | ||
|
|
dab8c4a0e3 | ||
|
|
87438adc9a | ||
|
|
c385e24839 | ||
|
|
f87eaaa810 | ||
|
|
48e7bc1331 | ||
|
|
ee1698e789 | ||
|
|
084625b759 | ||
|
|
2915a16a14 | ||
|
|
a5c8f2286e | ||
|
|
d3856a8bfa | ||
|
|
0384df092f |
@@ -32,6 +32,7 @@
|
|||||||
"SwaggerUi": false,
|
"SwaggerUi": false,
|
||||||
"jsyaml": false,
|
"jsyaml": false,
|
||||||
"define": false,
|
"define": false,
|
||||||
|
"sanitizeHtml": false,
|
||||||
|
|
||||||
// Global object
|
// Global object
|
||||||
// TODO: remove these
|
// TODO: remove these
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ The OpenAPI Specification has undergone 4 revisions since initial creation in 20
|
|||||||
|
|
||||||
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
|
Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes | Status
|
||||||
------------------ | ------------ | -------------------------- | ----- | ------
|
------------------ | ------------ | -------------------------- | ----- | ------
|
||||||
2.2.1 | 2016-08-23 | 1.1, 1.2, 2.0 | [tag v.2.2.1](https://github.com/swagger-api/swagger-ui/tree/v2.2.0) |
|
2.2.6 | 2016-10-14 | 1.1, 1.2, 2.0 | [tag v2.2.6](https://github.com/swagger-api/swagger-ui/tree/v2.2.6) |
|
||||||
2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v.2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
|
2.1.5 | 2016-07-20 | 1.1, 1.2, 2.0 | [tag v2.1.5](https://github.com/swagger-api/swagger-ui/tree/v2.1.5) |
|
||||||
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) |
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "swagger-api/swagger-ui",
|
||||||
|
"description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||||
|
"keywords": [
|
||||||
|
"Swagger",
|
||||||
|
"OpenAPI",
|
||||||
|
"specification",
|
||||||
|
"documentation",
|
||||||
|
"API",
|
||||||
|
"UI"
|
||||||
|
],
|
||||||
|
"homepage": "http://swagger.io",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Tony Tam",
|
||||||
|
"email": "fehguy@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mohsen Azimi",
|
||||||
|
"email": "me@azimi.me"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+2
-2
@@ -3,12 +3,12 @@
|
|||||||
font-family: 'Droid Sans';
|
font-family: 'Droid Sans';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype');
|
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
/* Google Font's Droid Sans Bold */
|
/* Google Font's Droid Sans Bold */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Droid Sans';
|
font-family: 'Droid Sans';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype');
|
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+53
@@ -0,0 +1,53 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Advertència: Obsolet",
|
||||||
|
"Implementation Notes":"Notes d'implementació",
|
||||||
|
"Response Class":"Classe de la Resposta",
|
||||||
|
"Status":"Estatus",
|
||||||
|
"Parameters":"Paràmetres",
|
||||||
|
"Parameter":"Paràmetre",
|
||||||
|
"Value":"Valor",
|
||||||
|
"Description":"Descripció",
|
||||||
|
"Parameter Type":"Tipus del Paràmetre",
|
||||||
|
"Data Type":"Tipus de la Dada",
|
||||||
|
"Response Messages":"Missatges de la Resposta",
|
||||||
|
"HTTP Status Code":"Codi d'Estatus HTTP",
|
||||||
|
"Reason":"Raó",
|
||||||
|
"Response Model":"Model de la Resposta",
|
||||||
|
"Request URL":"URL de la Sol·licitud",
|
||||||
|
"Response Body":"Cos de la Resposta",
|
||||||
|
"Response Code":"Codi de la Resposta",
|
||||||
|
"Response Headers":"Capçaleres de la Resposta",
|
||||||
|
"Hide Response":"Amagar Resposta",
|
||||||
|
"Try it out!":"Prova-ho!",
|
||||||
|
"Show/Hide":"Mostrar/Amagar",
|
||||||
|
"List Operations":"Llista Operacions",
|
||||||
|
"Expand Operations":"Expandir Operacions",
|
||||||
|
"Raw":"Cru",
|
||||||
|
"can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
|
||||||
|
"Example Value":"Valor d'Exemple",
|
||||||
|
"Model Schema":"Esquema del Model",
|
||||||
|
"Model":"Model",
|
||||||
|
"apply":"aplicar",
|
||||||
|
"Username":"Nom d'usuari",
|
||||||
|
"Password":"Contrasenya",
|
||||||
|
"Terms of service":"Termes del servei",
|
||||||
|
"Created by":"Creat per",
|
||||||
|
"See more at":"Veure més en",
|
||||||
|
"Contact the developer":"Contactar amb el desenvolupador",
|
||||||
|
"api version":"versió de la api",
|
||||||
|
"Response Content Type":"Tipus de Contingut de la Resposta",
|
||||||
|
"fetching resource":"recollint recurs",
|
||||||
|
"fetching resource list":"recollins llista de recursos",
|
||||||
|
"Explore":"Explorant",
|
||||||
|
"Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
|
||||||
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.",
|
||||||
|
"Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
|
||||||
|
"Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
|
||||||
|
"Unable to read api":"No es pot llegir l'api",
|
||||||
|
"from path":"des de la ruta",
|
||||||
|
"server returned":"el servidor ha retornat"
|
||||||
|
});
|
||||||
Vendored
+56
@@ -0,0 +1,56 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Προειδοποίηση: Έχει αποσυρθεί",
|
||||||
|
"Implementation Notes":"Σημειώσεις Υλοποίησης",
|
||||||
|
"Response Class":"Απόκριση",
|
||||||
|
"Status":"Κατάσταση",
|
||||||
|
"Parameters":"Παράμετροι",
|
||||||
|
"Parameter":"Παράμετρος",
|
||||||
|
"Value":"Τιμή",
|
||||||
|
"Description":"Περιγραφή",
|
||||||
|
"Parameter Type":"Τύπος Παραμέτρου",
|
||||||
|
"Data Type":"Τύπος Δεδομένων",
|
||||||
|
"Response Messages":"Μηνύματα Απόκρισης",
|
||||||
|
"HTTP Status Code":"Κωδικός Κατάστασης HTTP",
|
||||||
|
"Reason":"Αιτιολογία",
|
||||||
|
"Response Model":"Μοντέλο Απόκρισης",
|
||||||
|
"Request URL":"URL Αιτήματος",
|
||||||
|
"Response Body":"Σώμα Απόκρισης",
|
||||||
|
"Response Code":"Κωδικός Απόκρισης",
|
||||||
|
"Response Headers":"Επικεφαλίδες Απόκρισης",
|
||||||
|
"Hide Response":"Απόκρυψη Απόκρισης",
|
||||||
|
"Headers":"Επικεφαλίδες",
|
||||||
|
"Try it out!":"Δοκιμάστε το!",
|
||||||
|
"Show/Hide":"Εμφάνιση/Απόκρυψη",
|
||||||
|
"List Operations":"Λίστα Λειτουργιών",
|
||||||
|
"Expand Operations":"Ανάπτυξη Λειτουργιών",
|
||||||
|
"Raw":"Ακατέργαστο",
|
||||||
|
"can't parse JSON. Raw result":"αδυναμία ανάλυσης JSON. Ακατέργαστο αποτέλεσμα",
|
||||||
|
"Example Value":"Παράδειγμα Τιμής",
|
||||||
|
"Model Schema":"Σχήμα Μοντέλου",
|
||||||
|
"Model":"Μοντέλο",
|
||||||
|
"Click to set as parameter value":"Πατήστε για να θέσετε τιμή παραμέτρου",
|
||||||
|
"apply":"εφαρμογή",
|
||||||
|
"Username":"Όνομα χρήση",
|
||||||
|
"Password":"Κωδικός πρόσβασης",
|
||||||
|
"Terms of service":"Όροι χρήσης",
|
||||||
|
"Created by":"Δημιουργήθηκε από",
|
||||||
|
"See more at":"Δείτε περισσότερα στο",
|
||||||
|
"Contact the developer":"Επικοινωνήστε με τον προγραμματιστή",
|
||||||
|
"api version":"έκδοση api",
|
||||||
|
"Response Content Type":"Τύπος Περιεχομένου Απόκρισης",
|
||||||
|
"Parameter content type:":"Τύπος περιεχομένου παραμέτρου:",
|
||||||
|
"fetching resource":"παραλαβή πόρου",
|
||||||
|
"fetching resource list":"παραλαβή λίστας πόρων",
|
||||||
|
"Explore":"Εξερεύνηση",
|
||||||
|
"Show Swagger Petstore Example Apis":"Εμφάνιση Api Δειγμάτων Petstore του Swagger",
|
||||||
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Αδυναμία ανάγνωσης από τον εξυπηρετητή. Μπορεί να μην έχει κατάλληλες ρυθμίσεις για access-control-origin.",
|
||||||
|
"Please specify the protocol for":"Παρακαλώ προσδιορίστε το πρωτόκολλο για",
|
||||||
|
"Can't read swagger JSON from":"Αδυναμία ανάγνωσης swagger JSON από",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Ολοκλήρωση Φόρτωσης Πληροφορικών Πόρου. Παρουσίαση Swagger UI",
|
||||||
|
"Unable to read api":"Αδυναμία ανάγνωσης api",
|
||||||
|
"from path":"από το μονοπάτι",
|
||||||
|
"server returned":"ο εξυπηρετηρής επέστρεψε"
|
||||||
|
});
|
||||||
Vendored
+6
-3
@@ -26,22 +26,25 @@ window.SwaggerTranslator.learn({
|
|||||||
"Show/Hide":"表示/非表示",
|
"Show/Hide":"表示/非表示",
|
||||||
"List Operations":"操作一覧",
|
"List Operations":"操作一覧",
|
||||||
"Expand Operations":"操作の展開",
|
"Expand Operations":"操作の展開",
|
||||||
"Raw":"Raw",
|
"Raw":"未加工",
|
||||||
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
||||||
|
"Example Value":"値の例",
|
||||||
"Model Schema":"モデルスキーマ",
|
"Model Schema":"モデルスキーマ",
|
||||||
"Model":"モデル",
|
"Model":"モデル",
|
||||||
|
"Click to set as parameter value":"パラメータ値と設定するにはクリック",
|
||||||
"apply":"実行",
|
"apply":"実行",
|
||||||
"Username":"ユーザ名",
|
"Username":"ユーザ名",
|
||||||
"Password":"パスワード",
|
"Password":"パスワード",
|
||||||
"Terms of service":"サービス利用規約",
|
"Terms of service":"サービス利用規約",
|
||||||
"Created by":"Created by",
|
"Created by":"Created by",
|
||||||
"See more at":"See more at",
|
"See more at":"詳細を見る",
|
||||||
"Contact the developer":"開発者に連絡",
|
"Contact the developer":"開発者に連絡",
|
||||||
"api version":"APIバージョン",
|
"api version":"APIバージョン",
|
||||||
"Response Content Type":"レスポンス コンテンツタイプ",
|
"Response Content Type":"レスポンス コンテンツタイプ",
|
||||||
|
"Parameter content type:":"パラメータコンテンツタイプ:",
|
||||||
"fetching resource":"リソースの取得",
|
"fetching resource":"リソースの取得",
|
||||||
"fetching resource list":"リソース一覧の取得",
|
"fetching resource list":"リソース一覧の取得",
|
||||||
"Explore":"Explore",
|
"Explore":"調査",
|
||||||
"Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
|
"Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
|
||||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
|
||||||
"Please specify the protocol for":"プロトコルを指定してください",
|
"Please specify the protocol for":"プロトコルを指定してください",
|
||||||
|
|||||||
Vendored
+3
@@ -28,6 +28,8 @@ window.SwaggerTranslator.learn({
|
|||||||
"Expand Operations":"展开操作",
|
"Expand Operations":"展开操作",
|
||||||
"Raw":"原始",
|
"Raw":"原始",
|
||||||
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
||||||
|
"Example Value":"示例",
|
||||||
|
"Click to set as parameter value":"点击设置参数",
|
||||||
"Model Schema":"模型架构",
|
"Model Schema":"模型架构",
|
||||||
"Model":"模型",
|
"Model":"模型",
|
||||||
"apply":"应用",
|
"apply":"应用",
|
||||||
@@ -39,6 +41,7 @@ window.SwaggerTranslator.learn({
|
|||||||
"Contact the developer":"联系开发者",
|
"Contact the developer":"联系开发者",
|
||||||
"api version":"api版本",
|
"api version":"api版本",
|
||||||
"Response Content Type":"响应Content Type",
|
"Response Content Type":"响应Content Type",
|
||||||
|
"Parameter content type:":"参数类型:",
|
||||||
"fetching resource":"正在获取资源",
|
"fetching resource":"正在获取资源",
|
||||||
"fetching resource list":"正在获取资源列表",
|
"fetching resource list":"正在获取资源列表",
|
||||||
"Explore":"浏览",
|
"Explore":"浏览",
|
||||||
|
|||||||
Vendored
+6
File diff suppressed because one or more lines are too long
Vendored
+8
-7
@@ -11,7 +11,7 @@ var additionalQueryStringParams;
|
|||||||
function handleLogin() {
|
function handleLogin() {
|
||||||
var scopes = [];
|
var scopes = [];
|
||||||
|
|
||||||
var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
|
var auths = window.swaggerUiAuth.authSchemes || window.swaggerUiAuth.securityDefinitions;
|
||||||
if(auths) {
|
if(auths) {
|
||||||
var key;
|
var key;
|
||||||
var defs = auths;
|
var defs = auths;
|
||||||
@@ -36,8 +36,7 @@ function handleLogin() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.swaggerUi.api
|
if(window.swaggerUi.api && window.swaggerUi.api.info) {
|
||||||
&& window.swaggerUi.api.info) {
|
|
||||||
appName = window.swaggerUi.api.info.title;
|
appName = window.swaggerUi.api.info.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,7 +284,7 @@ window.processOAuthCode = function processOAuthCode(data) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
window.onOAuthComplete = function onOAuthComplete(token, OAuthSchemeKey) {
|
||||||
if(token) {
|
if(token) {
|
||||||
if(token.error) {
|
if(token.error) {
|
||||||
var checkbox = $('input[type=checkbox],.secured')
|
var checkbox = $('input[type=checkbox],.secured')
|
||||||
@@ -295,7 +294,7 @@ window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
|||||||
alert(token.error);
|
alert(token.error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var b = token[window.swaggerUi.tokenName];
|
var b = token[window.swaggerUiAuth.tokenName];
|
||||||
if (!OAuthSchemeKey){
|
if (!OAuthSchemeKey){
|
||||||
OAuthSchemeKey = token.state;
|
OAuthSchemeKey = token.state;
|
||||||
}
|
}
|
||||||
@@ -339,8 +338,10 @@ window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
|
if(typeof window.swaggerUi !== 'undefined') {
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.api.clientAuthorizations.add(window.swaggerUiAuth.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
|
||||||
|
window.swaggerUi.load();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
|
|||||||
return key===""?value:decodeURIComponent(value) }
|
return key===""?value:decodeURIComponent(value) }
|
||||||
):{}
|
):{}
|
||||||
|
|
||||||
if (window.opener.swaggerUi.tokenUrl)
|
if (window.opener.swaggerUiAuth.tokenUrl)
|
||||||
window.opener.processOAuthCode(qp);
|
window.opener.processOAuthCode(qp);
|
||||||
else
|
else
|
||||||
window.opener.onOAuthComplete(qp);
|
window.opener.onOAuthComplete(qp);
|
||||||
|
|||||||
Vendored
+940
-567
File diff suppressed because one or more lines are too long
Vendored
+13
-9
File diff suppressed because one or more lines are too long
@@ -14,6 +14,8 @@ var header = require('gulp-header');
|
|||||||
var order = require('gulp-order');
|
var order = require('gulp-order');
|
||||||
var jshint = require('gulp-jshint');
|
var jshint = require('gulp-jshint');
|
||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
|
|
||||||
|
|
||||||
var banner = ['/**',
|
var banner = ['/**',
|
||||||
' * <%= pkg.name %> - <%= pkg.description %>',
|
' * <%= pkg.name %> - <%= pkg.description %>',
|
||||||
@@ -50,6 +52,7 @@ function _dist() {
|
|||||||
return es.merge(
|
return es.merge(
|
||||||
gulp.src([
|
gulp.src([
|
||||||
'./node_modules/es5-shim/es5-shim.js',
|
'./node_modules/es5-shim/es5-shim.js',
|
||||||
|
'./lib/sanitize-html.min.js',
|
||||||
'./src/main/javascript/**/*.js',
|
'./src/main/javascript/**/*.js',
|
||||||
'./node_modules/swagger-client/browser/swagger-client.js'
|
'./node_modules/swagger-client/browser/swagger-client.js'
|
||||||
]),
|
]),
|
||||||
@@ -57,10 +60,12 @@ function _dist() {
|
|||||||
.src(['./src/main/template/templates.js'])
|
.src(['./src/main/template/templates.js'])
|
||||||
.on('error', log)
|
.on('error', log)
|
||||||
)
|
)
|
||||||
|
.pipe(sourcemaps.init({loadMaps: true}))
|
||||||
.pipe(order(['scripts.js', 'templates.js']))
|
.pipe(order(['scripts.js', 'templates.js']))
|
||||||
.pipe(concat('swagger-ui.js'))
|
.pipe(concat('swagger-ui.js'))
|
||||||
.pipe(wrap('(function(){<%= contents %>}).call(this);'))
|
.pipe(wrap('(function(){<%= contents %>}).call(this);'))
|
||||||
.pipe(header(banner, { pkg: pkg }))
|
.pipe(header(banner, { pkg: pkg }))
|
||||||
|
.pipe(sourcemaps.write())
|
||||||
.pipe(gulp.dest('./dist'))
|
.pipe(gulp.dest('./dist'))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
.on('error', log)
|
.on('error', log)
|
||||||
|
|||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Advertència: Obsolet",
|
||||||
|
"Implementation Notes":"Notes d'implementació",
|
||||||
|
"Response Class":"Classe de la Resposta",
|
||||||
|
"Status":"Estatus",
|
||||||
|
"Parameters":"Paràmetres",
|
||||||
|
"Parameter":"Paràmetre",
|
||||||
|
"Value":"Valor",
|
||||||
|
"Description":"Descripció",
|
||||||
|
"Parameter Type":"Tipus del Paràmetre",
|
||||||
|
"Data Type":"Tipus de la Dada",
|
||||||
|
"Response Messages":"Missatges de la Resposta",
|
||||||
|
"HTTP Status Code":"Codi d'Estatus HTTP",
|
||||||
|
"Reason":"Raó",
|
||||||
|
"Response Model":"Model de la Resposta",
|
||||||
|
"Request URL":"URL de la Sol·licitud",
|
||||||
|
"Response Body":"Cos de la Resposta",
|
||||||
|
"Response Code":"Codi de la Resposta",
|
||||||
|
"Response Headers":"Capçaleres de la Resposta",
|
||||||
|
"Hide Response":"Amagar Resposta",
|
||||||
|
"Try it out!":"Prova-ho!",
|
||||||
|
"Show/Hide":"Mostrar/Amagar",
|
||||||
|
"List Operations":"Llista Operacions",
|
||||||
|
"Expand Operations":"Expandir Operacions",
|
||||||
|
"Raw":"Cru",
|
||||||
|
"can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
|
||||||
|
"Example Value":"Valor d'Exemple",
|
||||||
|
"Model Schema":"Esquema del Model",
|
||||||
|
"Model":"Model",
|
||||||
|
"apply":"aplicar",
|
||||||
|
"Username":"Nom d'usuari",
|
||||||
|
"Password":"Contrasenya",
|
||||||
|
"Terms of service":"Termes del servei",
|
||||||
|
"Created by":"Creat per",
|
||||||
|
"See more at":"Veure més en",
|
||||||
|
"Contact the developer":"Contactar amb el desenvolupador",
|
||||||
|
"api version":"versió de la api",
|
||||||
|
"Response Content Type":"Tipus de Contingut de la Resposta",
|
||||||
|
"fetching resource":"recollint recurs",
|
||||||
|
"fetching resource list":"recollins llista de recursos",
|
||||||
|
"Explore":"Explorant",
|
||||||
|
"Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
|
||||||
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"No es pot llegir del servidor. Potser no teniu la configuració de control d'accés apropiada.",
|
||||||
|
"Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
|
||||||
|
"Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
|
||||||
|
"Unable to read api":"No es pot llegir l'api",
|
||||||
|
"from path":"des de la ruta",
|
||||||
|
"server returned":"el servidor ha retornat"
|
||||||
|
});
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* jshint quotmark: double */
|
||||||
|
window.SwaggerTranslator.learn({
|
||||||
|
"Warning: Deprecated":"Προειδοποίηση: Έχει αποσυρθεί",
|
||||||
|
"Implementation Notes":"Σημειώσεις Υλοποίησης",
|
||||||
|
"Response Class":"Απόκριση",
|
||||||
|
"Status":"Κατάσταση",
|
||||||
|
"Parameters":"Παράμετροι",
|
||||||
|
"Parameter":"Παράμετρος",
|
||||||
|
"Value":"Τιμή",
|
||||||
|
"Description":"Περιγραφή",
|
||||||
|
"Parameter Type":"Τύπος Παραμέτρου",
|
||||||
|
"Data Type":"Τύπος Δεδομένων",
|
||||||
|
"Response Messages":"Μηνύματα Απόκρισης",
|
||||||
|
"HTTP Status Code":"Κωδικός Κατάστασης HTTP",
|
||||||
|
"Reason":"Αιτιολογία",
|
||||||
|
"Response Model":"Μοντέλο Απόκρισης",
|
||||||
|
"Request URL":"URL Αιτήματος",
|
||||||
|
"Response Body":"Σώμα Απόκρισης",
|
||||||
|
"Response Code":"Κωδικός Απόκρισης",
|
||||||
|
"Response Headers":"Επικεφαλίδες Απόκρισης",
|
||||||
|
"Hide Response":"Απόκρυψη Απόκρισης",
|
||||||
|
"Headers":"Επικεφαλίδες",
|
||||||
|
"Try it out!":"Δοκιμάστε το!",
|
||||||
|
"Show/Hide":"Εμφάνιση/Απόκρυψη",
|
||||||
|
"List Operations":"Λίστα Λειτουργιών",
|
||||||
|
"Expand Operations":"Ανάπτυξη Λειτουργιών",
|
||||||
|
"Raw":"Ακατέργαστο",
|
||||||
|
"can't parse JSON. Raw result":"αδυναμία ανάλυσης JSON. Ακατέργαστο αποτέλεσμα",
|
||||||
|
"Example Value":"Παράδειγμα Τιμής",
|
||||||
|
"Model Schema":"Σχήμα Μοντέλου",
|
||||||
|
"Model":"Μοντέλο",
|
||||||
|
"Click to set as parameter value":"Πατήστε για να θέσετε τιμή παραμέτρου",
|
||||||
|
"apply":"εφαρμογή",
|
||||||
|
"Username":"Όνομα χρήση",
|
||||||
|
"Password":"Κωδικός πρόσβασης",
|
||||||
|
"Terms of service":"Όροι χρήσης",
|
||||||
|
"Created by":"Δημιουργήθηκε από",
|
||||||
|
"See more at":"Δείτε περισσότερα στο",
|
||||||
|
"Contact the developer":"Επικοινωνήστε με τον προγραμματιστή",
|
||||||
|
"api version":"έκδοση api",
|
||||||
|
"Response Content Type":"Τύπος Περιεχομένου Απόκρισης",
|
||||||
|
"Parameter content type:":"Τύπος περιεχομένου παραμέτρου:",
|
||||||
|
"fetching resource":"παραλαβή πόρου",
|
||||||
|
"fetching resource list":"παραλαβή λίστας πόρων",
|
||||||
|
"Explore":"Εξερεύνηση",
|
||||||
|
"Show Swagger Petstore Example Apis":"Εμφάνιση Api Δειγμάτων Petstore του Swagger",
|
||||||
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Αδυναμία ανάγνωσης από τον εξυπηρετητή. Μπορεί να μην έχει κατάλληλες ρυθμίσεις για access-control-origin.",
|
||||||
|
"Please specify the protocol for":"Παρακαλώ προσδιορίστε το πρωτόκολλο για",
|
||||||
|
"Can't read swagger JSON from":"Αδυναμία ανάγνωσης swagger JSON από",
|
||||||
|
"Finished Loading Resource Information. Rendering Swagger UI":"Ολοκλήρωση Φόρτωσης Πληροφορικών Πόρου. Παρουσίαση Swagger UI",
|
||||||
|
"Unable to read api":"Αδυναμία ανάγνωσης api",
|
||||||
|
"from path":"από το μονοπάτι",
|
||||||
|
"server returned":"ο εξυπηρετηρής επέστρεψε"
|
||||||
|
});
|
||||||
+6
-3
@@ -26,22 +26,25 @@ window.SwaggerTranslator.learn({
|
|||||||
"Show/Hide":"表示/非表示",
|
"Show/Hide":"表示/非表示",
|
||||||
"List Operations":"操作一覧",
|
"List Operations":"操作一覧",
|
||||||
"Expand Operations":"操作の展開",
|
"Expand Operations":"操作の展開",
|
||||||
"Raw":"Raw",
|
"Raw":"未加工",
|
||||||
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
||||||
|
"Example Value":"値の例",
|
||||||
"Model Schema":"モデルスキーマ",
|
"Model Schema":"モデルスキーマ",
|
||||||
"Model":"モデル",
|
"Model":"モデル",
|
||||||
|
"Click to set as parameter value":"パラメータ値と設定するにはクリック",
|
||||||
"apply":"実行",
|
"apply":"実行",
|
||||||
"Username":"ユーザ名",
|
"Username":"ユーザ名",
|
||||||
"Password":"パスワード",
|
"Password":"パスワード",
|
||||||
"Terms of service":"サービス利用規約",
|
"Terms of service":"サービス利用規約",
|
||||||
"Created by":"Created by",
|
"Created by":"Created by",
|
||||||
"See more at":"See more at",
|
"See more at":"詳細を見る",
|
||||||
"Contact the developer":"開発者に連絡",
|
"Contact the developer":"開発者に連絡",
|
||||||
"api version":"APIバージョン",
|
"api version":"APIバージョン",
|
||||||
"Response Content Type":"レスポンス コンテンツタイプ",
|
"Response Content Type":"レスポンス コンテンツタイプ",
|
||||||
|
"Parameter content type:":"パラメータコンテンツタイプ:",
|
||||||
"fetching resource":"リソースの取得",
|
"fetching resource":"リソースの取得",
|
||||||
"fetching resource list":"リソース一覧の取得",
|
"fetching resource list":"リソース一覧の取得",
|
||||||
"Explore":"Explore",
|
"Explore":"調査",
|
||||||
"Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
|
"Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
|
||||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
|
"Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
|
||||||
"Please specify the protocol for":"プロトコルを指定してください",
|
"Please specify the protocol for":"プロトコルを指定してください",
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ window.SwaggerTranslator.learn({
|
|||||||
"Expand Operations":"展开操作",
|
"Expand Operations":"展开操作",
|
||||||
"Raw":"原始",
|
"Raw":"原始",
|
||||||
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
||||||
|
"Example Value":"示例",
|
||||||
|
"Click to set as parameter value":"点击设置参数",
|
||||||
"Model Schema":"模型架构",
|
"Model Schema":"模型架构",
|
||||||
"Model":"模型",
|
"Model":"模型",
|
||||||
"apply":"应用",
|
"apply":"应用",
|
||||||
@@ -39,6 +41,7 @@ window.SwaggerTranslator.learn({
|
|||||||
"Contact the developer":"联系开发者",
|
"Contact the developer":"联系开发者",
|
||||||
"api version":"api版本",
|
"api version":"api版本",
|
||||||
"Response Content Type":"响应Content Type",
|
"Response Content Type":"响应Content Type",
|
||||||
|
"Parameter content type:":"参数类型:",
|
||||||
"fetching resource":"正在获取资源",
|
"fetching resource":"正在获取资源",
|
||||||
"fetching resource list":"正在获取资源列表",
|
"fetching resource list":"正在获取资源列表",
|
||||||
"Explore":"浏览",
|
"Explore":"浏览",
|
||||||
|
|||||||
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ var additionalQueryStringParams;
|
|||||||
function handleLogin() {
|
function handleLogin() {
|
||||||
var scopes = [];
|
var scopes = [];
|
||||||
|
|
||||||
var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
|
var auths = window.swaggerUiAuth.authSchemes || window.swaggerUiAuth.securityDefinitions;
|
||||||
if(auths) {
|
if(auths) {
|
||||||
var key;
|
var key;
|
||||||
var defs = auths;
|
var defs = auths;
|
||||||
@@ -36,8 +36,7 @@ function handleLogin() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.swaggerUi.api
|
if(window.swaggerUi.api && window.swaggerUi.api.info) {
|
||||||
&& window.swaggerUi.api.info) {
|
|
||||||
appName = window.swaggerUi.api.info.title;
|
appName = window.swaggerUi.api.info.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,7 +284,7 @@ window.processOAuthCode = function processOAuthCode(data) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
window.onOAuthComplete = function onOAuthComplete(token, OAuthSchemeKey) {
|
||||||
if(token) {
|
if(token) {
|
||||||
if(token.error) {
|
if(token.error) {
|
||||||
var checkbox = $('input[type=checkbox],.secured')
|
var checkbox = $('input[type=checkbox],.secured')
|
||||||
@@ -295,7 +294,7 @@ window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
|||||||
alert(token.error);
|
alert(token.error);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var b = token[window.swaggerUi.tokenName];
|
var b = token[window.swaggerUiAuth.tokenName];
|
||||||
if (!OAuthSchemeKey){
|
if (!OAuthSchemeKey){
|
||||||
OAuthSchemeKey = token.state;
|
OAuthSchemeKey = token.state;
|
||||||
}
|
}
|
||||||
@@ -339,8 +338,10 @@ window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
|
if(typeof window.swaggerUi !== 'undefined') {
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.api.clientAuthorizations.add(window.swaggerUiAuth.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
|
||||||
|
window.swaggerUi.load();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -8,13 +8,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"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.2.1",
|
"version": "2.2.6",
|
||||||
"homepage": "http://swagger.io",
|
"homepage": "http://swagger.io",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "dist/swagger-ui.js",
|
"main": "dist/swagger-ui.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run handlebars && gulp",
|
"build": "npm run handlebars && gulp",
|
||||||
"handlebars": "./node_modules/handlebars/bin/handlebars ./src/main/template -f ./src/main/template/templates.js && gulp handlebars",
|
"handlebars": "handlebars ./src/main/template -f ./src/main/template/templates.js && gulp handlebars",
|
||||||
"serve": "gulp serve",
|
"serve": "gulp serve",
|
||||||
"prejshint": "gulp",
|
"prejshint": "gulp",
|
||||||
"jshint": "jshint .",
|
"jshint": "jshint .",
|
||||||
@@ -43,6 +43,7 @@
|
|||||||
"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",
|
||||||
|
"gulp-sourcemaps": "^2.2.0",
|
||||||
"gulp-uglify": "^1.1.0",
|
"gulp-uglify": "^1.1.0",
|
||||||
"gulp-watch": "^4.1.1",
|
"gulp-watch": "^4.1.1",
|
||||||
"gulp-wrap": "^0.11.0",
|
"gulp-wrap": "^0.11.0",
|
||||||
@@ -60,6 +61,6 @@
|
|||||||
"phantomjs": "1.9.19",
|
"phantomjs": "1.9.19",
|
||||||
"selenium-webdriver": "^2.45.0",
|
"selenium-webdriver": "^2.45.0",
|
||||||
"sinon-chai": "2.8.0",
|
"sinon-chai": "2.8.0",
|
||||||
"swagger-client": "2.1.18"
|
"swagger-client": "2.1.25"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
font-family: 'Droid Sans';
|
font-family: 'Droid Sans';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf'), format('truetype');
|
src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
/* Google Font's Droid Sans Bold */
|
/* Google Font's Droid Sans Bold */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Droid Sans';
|
font-family: 'Droid Sans';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf'), format('truetype');
|
src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
|
|||||||
return key===""?value:decodeURIComponent(value) }
|
return key===""?value:decodeURIComponent(value) }
|
||||||
):{}
|
):{}
|
||||||
|
|
||||||
if (window.opener.swaggerUi.tokenUrl)
|
if (window.opener.swaggerUiAuth.tokenUrl)
|
||||||
window.opener.processOAuthCode(qp);
|
window.opener.processOAuthCode(qp);
|
||||||
else
|
else
|
||||||
window.opener.onOAuthComplete(qp);
|
window.opener.onOAuthComplete(qp);
|
||||||
|
|||||||
@@ -1,34 +1,22 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
/*jslint eqeq: true*/
|
/*jslint eqeq: true*/
|
||||||
|
|
||||||
var _sanitize = function(html) {
|
Handlebars.registerHelper('sanitize', function (text) {
|
||||||
// Strip the script tags from the html and inline evenhandlers
|
var result;
|
||||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
|
||||||
html = html.replace(/(on\w+="[^"]*")*(on\w+='[^']*')*(on\w+=\w*\(\w*\))*/gi, '');
|
|
||||||
|
|
||||||
return html;
|
if (text === undefined) { return ''; }
|
||||||
};
|
|
||||||
|
|
||||||
var sanitize =function (html) {
|
result = sanitizeHtml(text, {
|
||||||
var _html;
|
allowedTags: [ 'div', 'span', 'b', 'i', 'em', 'strong', 'a' ],
|
||||||
|
allowedAttributes: {
|
||||||
|
'div': [ 'class' ],
|
||||||
|
'span': [ 'class' ],
|
||||||
|
'a': [ 'href' ]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if ( _.isUndefined(html) || _.isNull(html)) {
|
return new Handlebars.SafeString(result);
|
||||||
return new Handlebars.SafeString('');
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (_.isNumber(html)) {
|
|
||||||
return new Handlebars.SafeString(html);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_.isObject(html)){
|
|
||||||
_html = JSON.stringify(html);
|
|
||||||
return new Handlebars.SafeString(JSON.parse(_sanitize(_html)));
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Handlebars.SafeString(_sanitize(html));
|
|
||||||
};
|
|
||||||
|
|
||||||
Handlebars.registerHelper('sanitize', sanitize);
|
|
||||||
|
|
||||||
Handlebars.registerHelper('renderTextParam', function(param) {
|
Handlebars.registerHelper('renderTextParam', function(param) {
|
||||||
var result, type = 'text', idAtt = '';
|
var result, type = 'text', idAtt = '';
|
||||||
@@ -55,7 +43,11 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
|||||||
idAtt = ' id=\'' + valueId + '\'';
|
idAtt = ' id=\'' + valueId + '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultValue = sanitize(defaultValue);
|
if (defaultValue) {
|
||||||
|
defaultValue = sanitizeHtml(defaultValue);
|
||||||
|
} else {
|
||||||
|
defaultValue = '';
|
||||||
|
}
|
||||||
|
|
||||||
if(isArray) {
|
if(isArray) {
|
||||||
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + name + '\'' + idAtt + dataVendorExtensions;
|
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + name + '\'' + idAtt + dataVendorExtensions;
|
||||||
@@ -101,4 +93,4 @@ Handlebars.registerHelper('escape', function (value) {
|
|||||||
var text = Handlebars.Utils.escapeExpression(value);
|
var text = Handlebars.Utils.escapeExpression(value);
|
||||||
|
|
||||||
return new Handlebars.SafeString(text);
|
return new Handlebars.SafeString(text);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
window.SwaggerUi.utils = {
|
window.SwaggerUi.utils = {
|
||||||
parseSecurityDefinitions: function (security) {
|
parseSecurityDefinitions: function (security, securityDefinitions) {
|
||||||
var auths = Object.assign({}, window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions);
|
var auths = Object.assign({}, securityDefinitions);
|
||||||
var oauth2Arr = [];
|
var oauth2Arr = [];
|
||||||
var authsArr = [];
|
var authsArr = [];
|
||||||
var scopes = [];
|
var scopes = [];
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
|
|||||||
var scopes = _.map(auth.get('scopes'), function (scope) {
|
var scopes = _.map(auth.get('scopes'), function (scope) {
|
||||||
return scope.scope;
|
return scope.scope;
|
||||||
});
|
});
|
||||||
|
var container = window.swaggerUiAuth || (window.swaggerUiAuth = {});
|
||||||
var state, dets, ep;
|
var state, dets, ep;
|
||||||
window.OAuthSchemeKey = auth.get('title');
|
container.OAuthSchemeKey = auth.get('title');
|
||||||
|
|
||||||
window.enabledScopes = scopes;
|
window.enabledScopes = scopes;
|
||||||
var flow = auth.get('flow');
|
var flow = auth.get('flow');
|
||||||
@@ -109,14 +110,14 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
|
|||||||
if(auth.get('type') === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
|
if(auth.get('type') === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
|
||||||
dets = auth.attributes;
|
dets = auth.attributes;
|
||||||
url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
|
url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
|
||||||
window.swaggerUi.tokenName = dets.tokenName || 'access_token';
|
container.tokenName = dets.tokenName || 'access_token';
|
||||||
window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
|
container.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
|
||||||
state = window.OAuthSchemeKey;
|
state = container.OAuthSchemeKey;
|
||||||
}
|
}
|
||||||
else if(auth.get('type') === 'oauth2' && flow && (flow === 'application')) {
|
else if(auth.get('type') === 'oauth2' && flow && (flow === 'application')) {
|
||||||
dets = auth.attributes;
|
dets = auth.attributes;
|
||||||
window.swaggerUi.tokenName = dets.tokenName || 'access_token';
|
container.tokenName = dets.tokenName || 'access_token';
|
||||||
this.clientCredentialsFlow(scopes, dets.tokenUrl, window.OAuthSchemeKey);
|
this.clientCredentialsFlow(scopes, dets.tokenUrl, container.OAuthSchemeKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(auth.get('grantTypes')) {
|
else if(auth.get('grantTypes')) {
|
||||||
@@ -127,13 +128,13 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
|
|||||||
dets = o[t];
|
dets = o[t];
|
||||||
ep = dets.loginEndpoint.url;
|
ep = dets.loginEndpoint.url;
|
||||||
url = dets.loginEndpoint.url + '?response_type=token';
|
url = dets.loginEndpoint.url + '?response_type=token';
|
||||||
window.swaggerUi.tokenName = dets.tokenName;
|
container.tokenName = dets.tokenName;
|
||||||
}
|
}
|
||||||
else if (o.hasOwnProperty(t) && t === 'accessCode') {
|
else if (o.hasOwnProperty(t) && t === 'accessCode') {
|
||||||
dets = o[t];
|
dets = o[t];
|
||||||
ep = dets.tokenRequestEndpoint.url;
|
ep = dets.tokenRequestEndpoint.url;
|
||||||
url = dets.tokenRequestEndpoint.url + '?response_type=code';
|
url = dets.tokenRequestEndpoint.url + '?response_type=code';
|
||||||
window.swaggerUi.tokenName = dets.tokenName;
|
container.tokenName = dets.tokenName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,11 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
parse: function (data) {
|
parse: function (data) {
|
||||||
var authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz);
|
var authz = {};
|
||||||
|
|
||||||
|
if(typeof window.swaggerUi !== 'undefined') {
|
||||||
|
authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz);
|
||||||
|
}
|
||||||
|
|
||||||
return _.map(data, function (auth, name) {
|
return _.map(data, function (auth, name) {
|
||||||
var isBasic = authz[name] && auth.type === 'basic' && authz[name].username && authz[name].password;
|
var isBasic = authz[name] && auth.type === 'basic' && authz[name].username && authz[name].password;
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
|
|||||||
id = id + '_' + counter;
|
id = id + '_' + counter;
|
||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
resource.id = SwaggerUi.utils.sanitize(id);
|
resource.id = sanitizeHtml(id);
|
||||||
resources[id] = resource;
|
resources[id] = resource;
|
||||||
this.addResource(resource, this.model.auths);
|
this.addResource(resource, this.model.auths);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,19 @@ SwaggerUi.Models.Oauth2Model = Backbone.Model.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
|
if(this.attributes && this.attributes.scopes) {
|
||||||
|
var attributes = _.cloneDeep(this.attributes);
|
||||||
|
var i, scopes = [];
|
||||||
|
for(i in attributes.scopes) {
|
||||||
|
var scope = attributes.scopes[i];
|
||||||
|
if(typeof scope.description === 'string') {
|
||||||
|
scopes[scope] = attributes.scopes[i];
|
||||||
|
scopes.push(attributes.scopes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
attributes.scopes = scopes;
|
||||||
|
this.attributes = attributes;
|
||||||
|
}
|
||||||
this.on('change', this.validate);
|
this.on('change', this.validate);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Note: copied from CoffeeScript compiled file
|
// Note: copied from CoffeeScript compiled file
|
||||||
// TODO: redactor
|
// TODO: refactor
|
||||||
render: function() {
|
render: function() {
|
||||||
var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, produces, isXML, isJSON;
|
var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, produces, isXML, isJSON;
|
||||||
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
|
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
|
||||||
@@ -258,9 +258,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(this.model.security)) {
|
if (Array.isArray(this.model.security)) {
|
||||||
var authsModel = SwaggerUi.utils.parseSecurityDefinitions(this.model.security);
|
var authsModel = SwaggerUi.utils.parseSecurityDefinitions(this.model.security, this.model.parent.securityDefinitions);
|
||||||
|
|
||||||
authsModel.isLogout = !_.isEmpty(window.swaggerUi.api.clientAuthorizations.authz);
|
authsModel.isLogout = !_.isEmpty(this.model.clientAuthorizations.authz);
|
||||||
this.authView = new SwaggerUi.Views.AuthButtonView({
|
this.authView = new SwaggerUi.Views.AuthButtonView({
|
||||||
data: authsModel,
|
data: authsModel,
|
||||||
router: this.router,
|
router: this.router,
|
||||||
@@ -660,7 +660,9 @@ 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(typeof content === 'string') {
|
||||||
|
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;
|
||||||
@@ -670,6 +672,17 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
contentType = contentType.split(';')[0].trim();
|
contentType = contentType.split(';')[0].trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(contentType) {
|
||||||
|
if(typeof content === 'string') {
|
||||||
|
var arrayBuffer = new ArrayBuffer(content.length);
|
||||||
|
var uint8Array = new Uint8Array(arrayBuffer);
|
||||||
|
for (var i = 0; i < content.length; i++) {
|
||||||
|
uint8Array[i] = content.charCodeAt(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
content = new Blob([uint8Array], { type: contentType });
|
||||||
|
}
|
||||||
|
}
|
||||||
$('.response_body', $(this.el)).removeClass('json');
|
$('.response_body', $(this.el)).removeClass('json');
|
||||||
$('.response_body', $(this.el)).removeClass('xml');
|
$('.response_body', $(this.el)).removeClass('xml');
|
||||||
|
|
||||||
@@ -685,6 +698,46 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
pre = $('<pre class="json" />').append(code);
|
pre = $('<pre class="json" />').append(code);
|
||||||
|
|
||||||
// JSON
|
// JSON
|
||||||
|
} else if (
|
||||||
|
contentType === 'application/octet-stream' ||
|
||||||
|
headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
|
||||||
|
headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
|
||||||
|
headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
|
||||||
|
headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
|
||||||
|
|
||||||
|
if ('Blob' in window) {
|
||||||
|
var type = contentType || 'text/html';
|
||||||
|
var a = document.createElement('a');
|
||||||
|
var href;
|
||||||
|
|
||||||
|
if({}.toString.apply(content) === '[object Blob]') {
|
||||||
|
href = window.URL.createObjectURL(content);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var binaryData = [];
|
||||||
|
binaryData.push(content);
|
||||||
|
href = window.URL.createObjectURL(new Blob(binaryData, {type: type}));
|
||||||
|
}
|
||||||
|
var fileName = response.url.substr(response.url.lastIndexOf('/') + 1);
|
||||||
|
var download = [type, fileName, href].join(':');
|
||||||
|
|
||||||
|
// Use filename from response header
|
||||||
|
var disposition = headers['content-disposition'] || headers['Content-Disposition'];
|
||||||
|
if(typeof disposition !== 'undefined') {
|
||||||
|
var responseFilename = /filename=([^;]*);?/.exec(disposition);
|
||||||
|
if(responseFilename !== null && responseFilename.length > 1) {
|
||||||
|
download = responseFilename[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a.setAttribute('href', href);
|
||||||
|
a.setAttribute('download', download);
|
||||||
|
a.innerText = 'Download ' + fileName;
|
||||||
|
|
||||||
|
pre = $('<div/>').append(a);
|
||||||
|
} else {
|
||||||
|
pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).');
|
||||||
|
}
|
||||||
} else if (contentType === 'application/json' || /\+json$/.test(contentType)) {
|
} else if (contentType === 'application/json' || /\+json$/.test(contentType)) {
|
||||||
var json = null;
|
var json = null;
|
||||||
try {
|
try {
|
||||||
@@ -710,49 +763,17 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
code = $('<code />').text(content);
|
code = $('<code />').text(content);
|
||||||
pre = $('<pre class="plain" />').append(code);
|
pre = $('<pre class="plain" />').append(code);
|
||||||
|
|
||||||
|
|
||||||
// Image
|
// Image
|
||||||
} else if (/^image\//.test(contentType)) {
|
} else if (/^image\//.test(contentType)) {
|
||||||
pre = $('<img>').attr('src', url);
|
var urlCreator = window.URL || window.webkitURL;
|
||||||
|
var imageUrl = urlCreator.createObjectURL(content);
|
||||||
|
|
||||||
|
pre = $('<img>').attr( 'src', imageUrl);
|
||||||
// Audio
|
// Audio
|
||||||
} else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) {
|
} else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) {
|
||||||
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));
|
||||||
|
|
||||||
// Download
|
|
||||||
} else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||
|
|
||||||
headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||
|
|
||||||
headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||
|
|
||||||
headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {
|
|
||||||
|
|
||||||
if ('Blob' in window) {
|
|
||||||
var type = contentType || 'text/html';
|
|
||||||
var blob = new Blob([content], {type: type});
|
|
||||||
var a = document.createElement('a');
|
|
||||||
var href = window.URL.createObjectURL(blob);
|
|
||||||
var fileName = response.url.substr(response.url.lastIndexOf('/') + 1);
|
|
||||||
var download = [type, fileName, href].join(':');
|
|
||||||
|
|
||||||
// Use filename from response header
|
|
||||||
var disposition = headers['content-disposition'] || headers['Content-Disposition'];
|
|
||||||
if(typeof disposition !== 'undefined') {
|
|
||||||
var responseFilename = /filename=([^;]*);?/.exec(disposition);
|
|
||||||
if(responseFilename !== null && responseFilename.length > 1) {
|
|
||||||
download = responseFilename[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a.setAttribute('href', href);
|
|
||||||
a.setAttribute('download', download);
|
|
||||||
a.innerText = 'Download ' + fileName;
|
|
||||||
|
|
||||||
pre = $('<div/>').append(a);
|
|
||||||
} else {
|
|
||||||
pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Location header based redirect download
|
|
||||||
} else if(headers.location || headers.Location) {
|
} else if(headers.location || headers.Location) {
|
||||||
|
// Location header based redirect download
|
||||||
window.location = response.url;
|
window.location = response.url;
|
||||||
|
|
||||||
// Anything else (CORS)
|
// Anything else (CORS)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
|
|||||||
var consumes = this.model.consumes || [];
|
var consumes = this.model.consumes || [];
|
||||||
var sampleJSON, signatureView;
|
var sampleJSON, signatureView;
|
||||||
|
|
||||||
|
|
||||||
if (typeof type === 'undefined') {
|
if (typeof type === 'undefined') {
|
||||||
if (schema.$ref) {
|
if (schema.$ref) {
|
||||||
var ref = schema.$ref;
|
var ref = schema.$ref;
|
||||||
|
|||||||
@@ -553,14 +553,30 @@ SwaggerUi.partials.signature = (function () {
|
|||||||
modelsToIgnore[value.name] = value;
|
modelsToIgnore[value.name] = value;
|
||||||
|
|
||||||
// Response support
|
// Response support
|
||||||
if (value.examples && _.isPlainObject(value.examples) && value.examples['application/json']) {
|
if (value.examples && _.isPlainObject(value.examples)) {
|
||||||
value.definition.example = value.examples['application/json'];
|
value = _.cloneDeep(value);
|
||||||
|
var keys = Object.keys(value.examples);
|
||||||
|
|
||||||
if (_.isString(value.definition.example)) {
|
_.forEach(keys, function(key) {
|
||||||
value.definition.example = jsyaml.safeLoad(value.definition.example);
|
if(key.indexOf('application/json') === 0) {
|
||||||
|
var example = value.examples[key];
|
||||||
|
if (_.isString(example)) {
|
||||||
|
example = jsyaml.safeLoad(example);
|
||||||
|
}
|
||||||
|
value.definition.example = example;
|
||||||
|
return schemaToJSON(value.definition, example, modelsToIgnore, value.modelPropertyMacro);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value.examples) {
|
||||||
|
value = _.cloneDeep(value);
|
||||||
|
var example = value.examples;
|
||||||
|
if (_.isString(example)) {
|
||||||
|
example = jsyaml.safeLoad(example);
|
||||||
}
|
}
|
||||||
} else if (!value.definition.example) {
|
value.definition.example = example;
|
||||||
value.definition.example = value.examples;
|
return schemaToJSON(value.definition, example, modelsToIgnore, value.modelPropertyMacro);
|
||||||
}
|
}
|
||||||
|
|
||||||
return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);
|
return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<div class="signature-container">
|
<div class="signature-container">
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{{escape signature}}}
|
{{sanitize signature}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="snippet">
|
<div class="snippet">
|
||||||
|
|||||||
@@ -708,8 +708,8 @@ templates['response_content_type'] = template({"1":function(container,depth0,hel
|
|||||||
templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) {
|
templates['signature'] = template({"1":function(container,depth0,helpers,partials,data) {
|
||||||
var stack1, alias1=depth0 != null ? depth0 : {};
|
var stack1, alias1=depth0 != null ? depth0 : {};
|
||||||
|
|
||||||
return "\n<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n "
|
return "\n<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n "
|
||||||
+ ((stack1 = (helpers.escape || (depth0 && depth0.escape) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"escape","hash":{},"data":data})) != null ? stack1 : "")
|
+ container.escapeExpression((helpers.sanitize || (depth0 && depth0.sanitize) || helpers.helperMissing).call(alias1,(depth0 != null ? depth0.signature : depth0),{"name":"sanitize","hash":{},"data":data}))
|
||||||
+ "\n </div>\n\n <div class=\"snippet\">\n"
|
+ "\n </div>\n\n <div class=\"snippet\">\n"
|
||||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleJSON : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||||
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
+ ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sampleXML : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
|
||||||
|
|||||||
@@ -27,6 +27,13 @@ paths:
|
|||||||
- <script language="javascript">alert('8')</script>
|
- <script language="javascript">alert('8')</script>
|
||||||
tags:
|
tags:
|
||||||
- Admin tasks<script language="javascript">alert('9')</script>
|
- Admin tasks<script language="javascript">alert('9')</script>
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: foo
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: reg
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: nothing<script language="javascript">alert('10')</script>
|
description: nothing<script language="javascript">alert('10')</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user