Skip to content
This repository was archived by the owner on Jan 11, 2021. It is now read-only.

Commit 706bafc

Browse files
committed
Merge branch 'feature/update-ui'
2 parents c5ad578 + 949e71b commit 706bafc

File tree

5 files changed

+82
-266
lines changed

5 files changed

+82
-266
lines changed

rest_framework_swagger/static/rest_framework_swagger/css/style.css

Lines changed: 0 additions & 250 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
'use strict';
2+
3+
/* jshint quotmark: double */
4+
window.SwaggerTranslator.learn({
5+
"Warning: Deprecated":"경고:폐기예정됨",
6+
"Implementation Notes":"구현 노트",
7+
"Response Class":"응답 클래스",
8+
"Status":"상태",
9+
"Parameters":"매개변수들",
10+
"Parameter":"매개변수",
11+
"Value":"값",
12+
"Description":"설명",
13+
"Parameter Type":"매개변수 타입",
14+
"Data Type":"데이터 타입",
15+
"Response Messages":"응답 메세지",
16+
"HTTP Status Code":"HTTP 상태 코드",
17+
"Reason":"원인",
18+
"Response Model":"응답 모델",
19+
"Request URL":"요청 URL",
20+
"Response Body":"응답 본문",
21+
"Response Code":"응답 코드",
22+
"Response Headers":"응답 헤더",
23+
"Hide Response":"응답 숨기기",
24+
"Headers":"헤더",
25+
"Try it out!":"써보기!",
26+
"Show/Hide":"보이기/숨기기",
27+
"List Operations":"목록 작업",
28+
"Expand Operations":"전개 작업",
29+
"Raw":"원본",
30+
"can't parse JSON. Raw result":"JSON을 파싱할수 없음. 원본결과:",
31+
"Model Schema":"모델 스키마",
32+
"Model":"모델",
33+
"apply":"적용",
34+
"Username":"사용자 이름",
35+
"Password":"암호",
36+
"Terms of service":"이용약관",
37+
"Created by":"작성자",
38+
"See more at":"추가정보:",
39+
"Contact the developer":"개발자에게 문의",
40+
"api version":"api버전",
41+
"Response Content Type":"응답Content Type",
42+
"fetching resource":"리소스 가져오기",
43+
"fetching resource list":"리소스 목록 가져오기",
44+
"Explore":"탐색",
45+
"Show Swagger Petstore Example Apis":"Swagger Petstore 예제 보기",
46+
"Can't read from server. It may not have the appropriate access-control-origin settings.":"서버로부터 읽어들일수 없습니다. access-control-origin 설정이 올바르지 않을수 있습니다.",
47+
"Please specify the protocol for":"다음을 위한 프로토콜을 정하세요",
48+
"Can't read swagger JSON from":"swagger JSON 을 다음으로 부터 읽을수 없습니다",
49+
"Finished Loading Resource Information. Rendering Swagger UI":"리소스 정보 불러오기 완료. Swagger UI 랜더링",
50+
"Unable to read api":"api를 읽을 수 없습니다.",
51+
"from path":"다음 경로로 부터",
52+
"server returned":"서버 응답함."
53+
});

rest_framework_swagger/static/rest_framework_swagger/lib/swagger-oauth.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,19 @@ function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) {
250250

251251
window.processOAuthCode = function processOAuthCode(data) {
252252
var OAuthSchemeKey = data.state;
253+
254+
// redirect_uri is required in auth code flow
255+
// see https://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1.3
256+
var host = window.location;
257+
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
258+
var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
259+
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
260+
253261
var params = {
254262
'client_id': clientId,
255263
'code': data.code,
256264
'grant_type': 'authorization_code',
257-
'redirect_uri': redirect_uri
265+
'redirect_uri': redirectUrl
258266
};
259267

260268
if (clientSecret) {

rest_framework_swagger/static/rest_framework_swagger/swagger-ui.js

Lines changed: 10 additions & 5 deletions
Large diffs are not rendered by default.

rest_framework_swagger/static/rest_framework_swagger/swagger-ui.min.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)