Merge remote-tracking branch 'upstream/master' into JSONEditorMaster
Conflicts: dist/swagger-ui.js dist/swagger-ui.min.js
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
# Swagger UI
|
# Swagger UI
|
||||||
|
|
||||||
[](https://travis-ci.org/swagger-api/swagger-ui)
|
[](https://travis-ci.org/swagger-api/swagger-ui)
|
||||||
|
[](http://badge.fury.io/js/swagger-ui)
|
||||||
|
|
||||||
|
[](https://david-dm.org/swagger-api/swagger-ui)
|
||||||
|
[](https://david-dm.org/swagger-api/swagger-ui#info=devDependencies)
|
||||||
|
|
||||||
Swagger UI is part of the Swagger project. The Swagger project allows you to produce, visualize and consume your OWN RESTful services. No proxy or 3rd party services required. Do it your own way.
|
Swagger UI is part of the Swagger project. The Swagger project allows you to produce, visualize and consume your OWN RESTful services. No proxy or 3rd party services required. Do it your own way.
|
||||||
|
|
||||||
@@ -86,6 +90,7 @@ swaggerUi.load();
|
|||||||
Parameter Name | Description
|
Parameter Name | Description
|
||||||
--- | ---
|
--- | ---
|
||||||
url | The url pointing to `swagger.json` (Swagger 2.0) or the resource listing (earlier versions) as per [Swagger Spec](https://github.com/swagger-api/swagger-spec/).
|
url | The url pointing to `swagger.json` (Swagger 2.0) or the resource listing (earlier versions) as per [Swagger Spec](https://github.com/swagger-api/swagger-spec/).
|
||||||
|
authorizations | An authorization object to be passed to swagger-js. Setting it here will trigger inclusion of any authorization or custom signing logic when fetching the swagger description file. Note the object structure should be `{ key: AuthorizationObject }`
|
||||||
spec | A JSON object describing the Swagger specification. When used, the `url` parameter will not be parsed. This is useful for testing manually-generated specifications without hosting them. Works for Swagger 2.0 specs only.
|
spec | A JSON object describing the Swagger specification. When used, the `url` parameter will not be parsed. This is useful for testing manually-generated specifications without hosting them. Works for Swagger 2.0 specs only.
|
||||||
validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. This parameter is relevant for Swagger 2.0 specs only.
|
validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation. This parameter is relevant for Swagger 2.0 specs only.
|
||||||
dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger.
|
dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger.
|
||||||
@@ -166,7 +171,7 @@ You can read about CORS here: http://www.w3.org/TR/cors.
|
|||||||
There are two cases where no action is needed for CORS support:
|
There are two cases where no action is needed for CORS support:
|
||||||
|
|
||||||
1. swagger-ui is hosted on the same server as the application itself (same host *and* port).
|
1. swagger-ui is hosted on the same server as the application itself (same host *and* port).
|
||||||
2. The application is located behind a proxy that enables the requires CORS headers. This may already be covered within your organization.
|
2. The application is located behind a proxy that enables the required CORS headers. This may already be covered within your organization.
|
||||||
|
|
||||||
Otherwise, CORS support needs to be enabled for:
|
Otherwise, CORS support needs to be enabled for:
|
||||||
|
|
||||||
|
|||||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -50,7 +50,7 @@
|
|||||||
if(typeof initOAuth == "function") {
|
if(typeof initOAuth == "function") {
|
||||||
initOAuth({
|
initOAuth({
|
||||||
clientId: "your-client-id",
|
clientId: "your-client-id",
|
||||||
clientSecret: "your-client-secret",
|
clientSecret: "your-client-secret-if-required",
|
||||||
realm: "your-realms",
|
realm: "your-realms",
|
||||||
appName: "your-app-name",
|
appName: "your-app-name",
|
||||||
scopeSeparator: ","
|
scopeSeparator: ","
|
||||||
|
|||||||
53
dist/lang/ja.js
vendored
Executable file
53
dist/lang/ja.js
vendored
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
'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":"Raw",
|
||||||
|
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
||||||
|
"Model Schema":"モデルスキーマ",
|
||||||
|
"Model":"モデル",
|
||||||
|
"apply":"実行",
|
||||||
|
"Username":"ユーザ名",
|
||||||
|
"Password":"パスワード",
|
||||||
|
"Terms of service":"サービス利用規約",
|
||||||
|
"Created by":"Created by",
|
||||||
|
"See more at":"See more at",
|
||||||
|
"Contact the developer":"開発者に連絡",
|
||||||
|
"api version":"APIバージョン",
|
||||||
|
"Response Content Type":"レスポンス コンテンツタイプ",
|
||||||
|
"fetching resource":"リソースの取得",
|
||||||
|
"fetching resource list":"リソース一覧の取得",
|
||||||
|
"Explore":"Explore",
|
||||||
|
"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設定を持っていない可能性があります.",
|
||||||
|
"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":"サーバからの返答"
|
||||||
|
});
|
||||||
12
dist/lib/swagger-oauth.js
vendored
12
dist/lib/swagger-oauth.js
vendored
@@ -187,7 +187,7 @@ function initOAuth(opts) {
|
|||||||
popupMask = (o.popupMask||$('#api-common-mask'));
|
popupMask = (o.popupMask||$('#api-common-mask'));
|
||||||
popupDialog = (o.popupDialog||$('.api-popup-dialog'));
|
popupDialog = (o.popupDialog||$('.api-popup-dialog'));
|
||||||
clientId = (o.clientId||errors.push('missing client id'));
|
clientId = (o.clientId||errors.push('missing client id'));
|
||||||
clientSecret = (o.clientSecret||errors.push('missing client secret'));
|
clientSecret = (o.clientSecret||null);
|
||||||
realm = (o.realm||errors.push('missing realm'));
|
realm = (o.realm||errors.push('missing realm'));
|
||||||
scopeSeparator = (o.scopeSeparator||' ');
|
scopeSeparator = (o.scopeSeparator||' ');
|
||||||
|
|
||||||
@@ -211,11 +211,15 @@ function initOAuth(opts) {
|
|||||||
window.processOAuthCode = function processOAuthCode(data) {
|
window.processOAuthCode = function processOAuthCode(data) {
|
||||||
var params = {
|
var params = {
|
||||||
'client_id': clientId,
|
'client_id': clientId,
|
||||||
'client_secret': clientSecret,
|
|
||||||
'code': data.code,
|
'code': data.code,
|
||||||
'grant_type': 'authorization_code',
|
'grant_type': 'authorization_code',
|
||||||
'redirect_uri': redirect_uri
|
'redirect_uri': redirect_uri
|
||||||
|
};
|
||||||
|
|
||||||
|
if (clientSecret) {
|
||||||
|
params.client_secret = clientSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
url : window.swaggerUi.tokenUrl,
|
url : window.swaggerUi.tokenUrl,
|
||||||
@@ -230,7 +234,7 @@ window.processOAuthCode = function processOAuthCode(data) {
|
|||||||
onOAuthComplete("");
|
onOAuthComplete("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
window.onOAuthComplete = function onOAuthComplete(token) {
|
window.onOAuthComplete = function onOAuthComplete(token) {
|
||||||
if(token) {
|
if(token) {
|
||||||
@@ -287,4 +291,4 @@ window.onOAuthComplete = function onOAuthComplete(token) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|||||||
4
dist/swagger-ui.js
vendored
4
dist/swagger-ui.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
* swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
||||||
* @version v2.1.3
|
* @version v2.1.4
|
||||||
* @link http://swagger.io
|
* @link http://swagger.io
|
||||||
* @license Apache-2.0
|
* @license Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -487,7 +487,7 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
|
|||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.program(24, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.program(24, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += " </form>\n <div class='response' style='display:none'>\n <h4>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n";
|
buffer += " </form>\n <div class='response' style='display:none'>\n <h4 class='curl'>Curl</h4>\n <div class='block curl'></div>\n <h4 data-sw-translate>Request URL</h4>\n <div class='block request_url'></div>\n";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + " <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
return buffer + " <h4 data-sw-translate>Response Body</h4>\n <div class='block response_body'></div>\n <h4 data-sw-translate>Response Code</h4>\n <div class='block response_code'></div>\n <h4 data-sw-translate>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
||||||
|
|||||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
53
lang/ja.js
Executable file
53
lang/ja.js
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
'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":"Raw",
|
||||||
|
"can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果",
|
||||||
|
"Model Schema":"モデルスキーマ",
|
||||||
|
"Model":"モデル",
|
||||||
|
"apply":"実行",
|
||||||
|
"Username":"ユーザ名",
|
||||||
|
"Password":"パスワード",
|
||||||
|
"Terms of service":"サービス利用規約",
|
||||||
|
"Created by":"Created by",
|
||||||
|
"See more at":"See more at",
|
||||||
|
"Contact the developer":"開発者に連絡",
|
||||||
|
"api version":"APIバージョン",
|
||||||
|
"Response Content Type":"レスポンス コンテンツタイプ",
|
||||||
|
"fetching resource":"リソースの取得",
|
||||||
|
"fetching resource list":"リソース一覧の取得",
|
||||||
|
"Explore":"Explore",
|
||||||
|
"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設定を持っていない可能性があります.",
|
||||||
|
"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":"サーバからの返答"
|
||||||
|
});
|
||||||
@@ -187,7 +187,7 @@ function initOAuth(opts) {
|
|||||||
popupMask = (o.popupMask||$('#api-common-mask'));
|
popupMask = (o.popupMask||$('#api-common-mask'));
|
||||||
popupDialog = (o.popupDialog||$('.api-popup-dialog'));
|
popupDialog = (o.popupDialog||$('.api-popup-dialog'));
|
||||||
clientId = (o.clientId||errors.push('missing client id'));
|
clientId = (o.clientId||errors.push('missing client id'));
|
||||||
clientSecret = (o.clientSecret||errors.push('missing client secret'));
|
clientSecret = (o.clientSecret||null);
|
||||||
realm = (o.realm||errors.push('missing realm'));
|
realm = (o.realm||errors.push('missing realm'));
|
||||||
scopeSeparator = (o.scopeSeparator||' ');
|
scopeSeparator = (o.scopeSeparator||' ');
|
||||||
|
|
||||||
@@ -211,11 +211,15 @@ function initOAuth(opts) {
|
|||||||
window.processOAuthCode = function processOAuthCode(data) {
|
window.processOAuthCode = function processOAuthCode(data) {
|
||||||
var params = {
|
var params = {
|
||||||
'client_id': clientId,
|
'client_id': clientId,
|
||||||
'client_secret': clientSecret,
|
|
||||||
'code': data.code,
|
'code': data.code,
|
||||||
'grant_type': 'authorization_code',
|
'grant_type': 'authorization_code',
|
||||||
'redirect_uri': redirect_uri
|
'redirect_uri': redirect_uri
|
||||||
|
};
|
||||||
|
|
||||||
|
if (clientSecret) {
|
||||||
|
params.client_secret = clientSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
url : window.swaggerUi.tokenUrl,
|
url : window.swaggerUi.tokenUrl,
|
||||||
@@ -230,7 +234,7 @@ window.processOAuthCode = function processOAuthCode(data) {
|
|||||||
onOAuthComplete("");
|
onOAuthComplete("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
window.onOAuthComplete = function onOAuthComplete(token) {
|
window.onOAuthComplete = function onOAuthComplete(token) {
|
||||||
if(token) {
|
if(token) {
|
||||||
@@ -287,4 +291,4 @@ window.onOAuthComplete = function onOAuthComplete(token) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"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.3",
|
"version": "2.1.4",
|
||||||
"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",
|
||||||
@@ -50,6 +50,6 @@
|
|||||||
"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.5"
|
"swagger-client": "2.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
if(typeof initOAuth == "function") {
|
if(typeof initOAuth == "function") {
|
||||||
initOAuth({
|
initOAuth({
|
||||||
clientId: "your-client-id",
|
clientId: "your-client-id",
|
||||||
clientSecret: "your-client-secret",
|
clientSecret: "your-client-secret-if-required",
|
||||||
realm: "your-realms",
|
realm: "your-realms",
|
||||||
appName: "your-app-name",
|
appName: "your-app-name",
|
||||||
scopeSeparator: ","
|
scopeSeparator: ","
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</form>
|
</form>
|
||||||
<div class='response' style='display:none'>
|
<div class='response' style='display:none'>
|
||||||
<h4>Curl</h4>
|
<h4 class='curl'>Curl</h4>
|
||||||
<div class='block curl'></div>
|
<div class='block curl'></div>
|
||||||
<h4 data-sw-translate>Request URL</h4>
|
<h4 data-sw-translate>Request URL</h4>
|
||||||
<div class='block request_url'></div>
|
<div class='block request_url'></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user