');
13 | this.authViews = [];
14 | },
15 |
16 | render: function () {
17 | this.collection.each(function (auth) {
18 | this.renderOneAuth(auth);
19 | }, this);
20 |
21 | this.$el.html(this.$innerEl.html() ? this.$innerEl : '');
22 |
23 | return this;
24 | },
25 |
26 | renderOneAuth: function (authModel) {
27 | var authViewEl, authView, authViewName;
28 | var type = authModel.get('type');
29 |
30 | if (type === 'apiKey') {
31 | authViewName = 'ApiKeyAuthView';
32 | } else if (type === 'basic' && this.$innerEl.find('.basic_auth_container').length === 0) {
33 | authViewName = 'BasicAuthView';
34 | } else if (type === 'oauth2') {
35 | authViewName = 'Oauth2View';
36 | }
37 |
38 | if (authViewName) {
39 | authView = new SwaggerUi.Views[authViewName]({model: authModel, router: this.router});
40 | authViewEl = authView.render().el;
41 | this.authViews.push(authView);
42 | }
43 |
44 | this.$innerEl.append(authViewEl);
45 | },
46 |
47 | highlightInvalid: function () {
48 | this.authViews.forEach(function (view) {
49 | view.highlightInvalid();
50 | }, this);
51 | }
52 |
53 | });
54 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 |
4 | # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5 | gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
6 | # Use postgresql as the database for Active Record
7 | gem 'pg', '~> 0.18'
8 | # Use Puma as the app server
9 | gem 'puma', '~> 3.0'
10 | # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
11 | # gem 'jbuilder', '~> 2.5'
12 | # Use Redis adapter to run Action Cable in production
13 | # gem 'redis', '~> 3.0'
14 | # Use ActiveModel has_secure_password
15 | # gem 'bcrypt', '~> 3.1.7'
16 |
17 | # Use Capistrano for deployment
18 | # gem 'capistrano-rails', group: :development
19 |
20 | # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
21 | gem 'rack-cors', '0.4.0'
22 |
23 | gem 'rack-attack', '5.0.1'
24 |
25 | gem 'active_model_serializers', '0.10.2'
26 |
27 | gem 'awesome_print', '1.7.0'
28 |
29 | gem 'swagger-docs', '0.2.9'
30 |
31 | gem "redis", '3.3.0'
32 |
33 | gem 'mina', '1.0.2'
34 |
35 | group :development, :test do
36 | # Call 'byebug' anywhere in the code to stop execution and get a debugger console
37 | gem 'byebug', platform: :mri
38 |
39 | # Use RSpec for specs
40 | gem 'rspec-rails', '3.5.2'
41 |
42 | # Use Factory Girl for generating random test data
43 | gem 'factory_girl_rails', '4.7.0'
44 | end
45 |
46 | group :development do
47 | gem 'listen', '~> 3.0.5'
48 | # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
49 | gem 'spring'
50 | gem 'spring-watcher-listen', '~> 2.0.0'
51 | end
52 |
53 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
54 | gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
55 |
--------------------------------------------------------------------------------
/public/api_html/dist/css/reset.css:
--------------------------------------------------------------------------------
1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
2 | html,
3 | body,
4 | div,
5 | span,
6 | applet,
7 | object,
8 | iframe,
9 | h1,
10 | h2,
11 | h3,
12 | h4,
13 | h5,
14 | h6,
15 | p,
16 | blockquote,
17 | pre,
18 | a,
19 | abbr,
20 | acronym,
21 | address,
22 | big,
23 | cite,
24 | code,
25 | del,
26 | dfn,
27 | em,
28 | img,
29 | ins,
30 | kbd,
31 | q,
32 | s,
33 | samp,
34 | small,
35 | strike,
36 | strong,
37 | sub,
38 | sup,
39 | tt,
40 | var,
41 | b,
42 | u,
43 | i,
44 | center,
45 | dl,
46 | dt,
47 | dd,
48 | ol,
49 | ul,
50 | li,
51 | fieldset,
52 | form,
53 | label,
54 | legend,
55 | table,
56 | caption,
57 | tbody,
58 | tfoot,
59 | thead,
60 | tr,
61 | th,
62 | td,
63 | article,
64 | aside,
65 | canvas,
66 | details,
67 | embed,
68 | figure,
69 | figcaption,
70 | footer,
71 | header,
72 | hgroup,
73 | menu,
74 | nav,
75 | output,
76 | ruby,
77 | section,
78 | summary,
79 | time,
80 | mark,
81 | audio,
82 | video {
83 | margin: 0;
84 | padding: 0;
85 | border: 0;
86 | font-size: 100%;
87 | font: inherit;
88 | vertical-align: baseline;
89 | }
90 | /* HTML5 display-role reset for older browsers */
91 | article,
92 | aside,
93 | details,
94 | figcaption,
95 | figure,
96 | footer,
97 | header,
98 | hgroup,
99 | menu,
100 | nav,
101 | section {
102 | display: block;
103 | }
104 | body {
105 | line-height: 1;
106 | }
107 | ol,
108 | ul {
109 | list-style: none;
110 | }
111 | blockquote,
112 | q {
113 | quotes: none;
114 | }
115 | blockquote:before,
116 | blockquote:after,
117 | q:before,
118 | q:after {
119 | content: '';
120 | content: none;
121 | }
122 | table {
123 | border-collapse: collapse;
124 | border-spacing: 0;
125 | }
126 |
--------------------------------------------------------------------------------
/public/api_html/src/main/html/css/reset.css:
--------------------------------------------------------------------------------
1 | /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
2 | html,
3 | body,
4 | div,
5 | span,
6 | applet,
7 | object,
8 | iframe,
9 | h1,
10 | h2,
11 | h3,
12 | h4,
13 | h5,
14 | h6,
15 | p,
16 | blockquote,
17 | pre,
18 | a,
19 | abbr,
20 | acronym,
21 | address,
22 | big,
23 | cite,
24 | code,
25 | del,
26 | dfn,
27 | em,
28 | img,
29 | ins,
30 | kbd,
31 | q,
32 | s,
33 | samp,
34 | small,
35 | strike,
36 | strong,
37 | sub,
38 | sup,
39 | tt,
40 | var,
41 | b,
42 | u,
43 | i,
44 | center,
45 | dl,
46 | dt,
47 | dd,
48 | ol,
49 | ul,
50 | li,
51 | fieldset,
52 | form,
53 | label,
54 | legend,
55 | table,
56 | caption,
57 | tbody,
58 | tfoot,
59 | thead,
60 | tr,
61 | th,
62 | td,
63 | article,
64 | aside,
65 | canvas,
66 | details,
67 | embed,
68 | figure,
69 | figcaption,
70 | footer,
71 | header,
72 | hgroup,
73 | menu,
74 | nav,
75 | output,
76 | ruby,
77 | section,
78 | summary,
79 | time,
80 | mark,
81 | audio,
82 | video {
83 | margin: 0;
84 | padding: 0;
85 | border: 0;
86 | font-size: 100%;
87 | font: inherit;
88 | vertical-align: baseline;
89 | }
90 | /* HTML5 display-role reset for older browsers */
91 | article,
92 | aside,
93 | details,
94 | figcaption,
95 | figure,
96 | footer,
97 | header,
98 | hgroup,
99 | menu,
100 | nav,
101 | section {
102 | display: block;
103 | }
104 | body {
105 | line-height: 1;
106 | }
107 | ol,
108 | ul {
109 | list-style: none;
110 | }
111 | blockquote,
112 | q {
113 | quotes: none;
114 | }
115 | blockquote:before,
116 | blockquote:after,
117 | q:before,
118 | q:after {
119 | content: '';
120 | content: none;
121 | }
122 | table {
123 | border-collapse: collapse;
124 | border-spacing: 0;
125 | }
126 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports.
13 | config.consider_all_requests_local = true
14 |
15 | # Enable/disable caching. By default caching is disabled.
16 | if Rails.root.join('tmp/caching-dev.txt').exist?
17 | config.action_controller.perform_caching = true
18 |
19 | config.cache_store = :memory_store
20 | config.public_file_server.headers = {
21 | 'Cache-Control' => 'public, max-age=172800'
22 | }
23 | else
24 | config.action_controller.perform_caching = false
25 |
26 | config.cache_store = :null_store
27 | end
28 |
29 | # Don't care if the mailer can't send.
30 | config.action_mailer.raise_delivery_errors = false
31 |
32 | config.action_mailer.perform_caching = false
33 |
34 | # Print deprecation notices to the Rails logger.
35 | config.active_support.deprecation = :log
36 |
37 | # Raise an error on page load if there are pending migrations.
38 | config.active_record.migration_error = :page_load
39 |
40 |
41 | # Raises error for missing translations
42 | # config.action_view.raise_on_missing_translations = true
43 |
44 | # Use an evented file watcher to asynchronously detect changes in source code,
45 | # routes, locales, etc. This feature depends on the listen gem.
46 | config.file_watcher = ActiveSupport::EventedFileUpdateChecker
47 | end
48 |
--------------------------------------------------------------------------------
/public/api_html/lang/zh-cn.js:
--------------------------------------------------------------------------------
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 示例 Apis",
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 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/zh-cn.js:
--------------------------------------------------------------------------------
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 示例 Apis",
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 | });
54 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure public file server for tests with Cache-Control for performance.
16 | config.public_file_server.enabled = true
17 | config.public_file_server.headers = {
18 | 'Cache-Control' => 'public, max-age=3600'
19 | }
20 |
21 | # Show full error reports and disable caching.
22 | config.consider_all_requests_local = true
23 | config.action_controller.perform_caching = false
24 |
25 | # Raise exceptions instead of rendering exception templates.
26 | config.action_dispatch.show_exceptions = false
27 |
28 | # Disable request forgery protection in test environment.
29 | config.action_controller.allow_forgery_protection = false
30 | config.action_mailer.perform_caching = false
31 |
32 | # Tell Action Mailer not to deliver emails to the real world.
33 | # The :test delivery method accumulates sent emails in the
34 | # ActionMailer::Base.deliveries array.
35 | config.action_mailer.delivery_method = :test
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/public/api_html/test/specs/v2/formats.yaml:
--------------------------------------------------------------------------------
1 | swagger: '2.0'
2 | info:
3 | version: 0.0.0
4 | title: title
5 | description: description with **markdown** format
6 | tags:
7 | - name: Admin
8 | description: tag with **markdown**
9 | - name: Xss
10 | description: tag with **markdown**
11 | paths:
12 | /test:
13 | get:
14 | description: description with **markdown** format
15 | summary: a summary with **markdown** format
16 | responses:
17 | 200:
18 | description: a description with **markdown** format
19 | schema:
20 | $ref: '#/definitions/User'
21 | post:
22 | description:
23 | summary:
24 | consumes:
25 | -
26 | produces:
27 | -
28 | tags:
29 | - Admin tasks
30 | parameters:
31 | - in: query
32 | name: foo
33 | type: string
34 | - in: query
35 | name: reg
36 | type: string
37 | responses:
38 | 200:
39 | description: nothing
40 | definitions:
41 | User:
42 | description: also with **markdown**
43 | properties:
44 | name:
45 | description: prop with **markdown**
46 | type: string
47 | email:
48 | $ref: '#/definitions/Email'
49 | Email:
50 | description:
51 | type: string
52 | format: email
53 | example:
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::API
2 | include ActionController::Serialization
3 | include ActionController::HttpAuthentication::Token::ControllerMethods
4 |
5 | before_action :authenticate, except: [:index_public]
6 | before_filter :throttle_token
7 |
8 | protected
9 |
10 | def authenticate
11 | authenticate_token || render_unauthorized
12 | end
13 |
14 | def authenticate_token
15 | authenticate_with_http_token do |token, options|
16 | @current_user = User.find_by(api_key: token)
17 | @token = token
18 | end
19 | end
20 |
21 | def render_unauthorized(realm = "Application")
22 | self.headers["WWW-Authenticate"] = %(Token realm="#{realm.gsub(/"/, "")}")
23 | render json: {message: 'Bad credentials'}, status: :unauthorized
24 | end
25 |
26 | def throttle_ip
27 | client_ip = request.env["REMOTE_ADDR"]
28 | key = "count:#{client_ip}"
29 | count = REDIS.get(key)
30 |
31 | unless count
32 | REDIS.set(key, 0)
33 | REDIS.expire(key, THROTTLE_TIME_WINDOW)
34 | return true
35 | end
36 |
37 | if count.to_i >= THROTTLE_MAX_REQUESTS
38 | render :json => {:message => "You have fired too many requests. Please wait for some time."}, :status => 429
39 | return
40 | end
41 | REDIS.incr(key)
42 | true
43 | end
44 |
45 | def throttle_token
46 | if @token.present?
47 | key = "count:#{@token}"
48 | count = REDIS.get(key)
49 |
50 | unless count
51 | REDIS.set(key, 0)
52 | REDIS.expire(key, THROTTLE_TIME_WINDOW)
53 | return true
54 | end
55 |
56 | if count.to_i >= THROTTLE_MAX_REQUESTS
57 | render :json => {:message => "You have fired too many requests. Please wait for some time."}, :status => 429
58 | return
59 | end
60 | REDIS.incr(key)
61 | true
62 | else
63 | false
64 | end
65 | end
66 |
67 | end
68 |
--------------------------------------------------------------------------------
/public/api_html/lang/ko-kr.js:
--------------------------------------------------------------------------------
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 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/src/main/template/main.handlebars:
--------------------------------------------------------------------------------
1 |
33 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/ko-kr.js:
--------------------------------------------------------------------------------
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 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/ja.js:
--------------------------------------------------------------------------------
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":"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":"Created by",
38 | "See more at":"See more at",
39 | "Contact the developer":"開発者に連絡",
40 | "api version":"APIバージョン",
41 | "Response Content Type":"レスポンス コンテンツタイプ",
42 | "fetching resource":"リソースの取得",
43 | "fetching resource list":"リソース一覧の取得",
44 | "Explore":"Explore",
45 | "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
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 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/test/specs/v1.2/petstore/api-docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "apiVersion": "1.0.0",
3 | "swaggerVersion": "1.2",
4 | "apis": [
5 | {
6 | "path": "http://localhost:8081/v1.2/petstore/pet.json",
7 | "description": "Operations about pets"
8 | },
9 | {
10 | "path": "http://localhost:8081/v1.2/petstore/user.json",
11 | "description": "Operations about user"
12 | },
13 | {
14 | "path": "http://localhost:8081/v1.2/petstore/store.json",
15 | "description": "Operations about store"
16 | }
17 | ],
18 | "authorizations": {
19 | "oauth2": {
20 | "type": "oauth2",
21 | "scopes": [
22 | {
23 | "scope": "email",
24 | "description": "Access to your email address"
25 | },
26 | {
27 | "scope": "pets",
28 | "description": "Access to your pets"
29 | }
30 | ],
31 | "grantTypes": {
32 | "implicit": {
33 | "loginEndpoint": {
34 | "url": "http://petstore.swagger.io/oauth/dialog"
35 | },
36 | "tokenName": "access_token"
37 | },
38 | "authorization_code": {
39 | "tokenRequestEndpoint": {
40 | "url": "http://petstore.swagger.io/oauth/requestToken",
41 | "clientIdName": "client_id",
42 | "clientSecretName": "client_secret"
43 | },
44 | "tokenEndpoint": {
45 | "url": "http://petstore.swagger.io/oauth/token",
46 | "tokenName": "access_code"
47 | }
48 | }
49 | }
50 | }
51 | },
52 | "info": {
53 | "title": "Swagger Sample App",
54 | "description": "This is a sample server Petstore server. You can find out more about Swagger \n at
or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
55 | "termsOfServiceUrl": "http://swagger.io/terms/",
56 | "contact": "apiteam@swagger.io",
57 | "license": "Apache 2.0",
58 | "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.html"
59 | }
60 | }
--------------------------------------------------------------------------------
/public/api_html/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "swagger-ui",
3 | "author": "Tony Tam
",
4 | "contributors": [
5 | {
6 | "name": "Mohsen Azimi",
7 | "email": "me@azimi.me"
8 | }
9 | ],
10 | "description": "Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
11 | "version": "2.2.5",
12 | "homepage": "http://swagger.io",
13 | "license": "Apache-2.0",
14 | "main": "dist/swagger-ui.js",
15 | "scripts": {
16 | "build": "npm run handlebars && gulp",
17 | "handlebars": "handlebars ./src/main/template -f ./src/main/template/templates.js && gulp handlebars",
18 | "serve": "gulp serve",
19 | "prejshint": "gulp",
20 | "jshint": "jshint .",
21 | "pretest": "npm run jshint",
22 | "test": "mocha"
23 | },
24 | "repository": {
25 | "type": "git",
26 | "url": "https://github.com/swagger-api/swagger-ui.git"
27 | },
28 | "readmeFilename": "README.md",
29 | "devDependencies": {
30 | "chai": "^2.1.0",
31 | "cors": "^2.5.3",
32 | "docco": "^0.7.0",
33 | "es5-shim": "^4.5.9",
34 | "event-stream": "^3.2.2",
35 | "express": "^4.12.0",
36 | "gulp": "^3.8.11",
37 | "gulp-clean": "^0.3.1",
38 | "gulp-concat": "^2.5.2",
39 | "gulp-connect": "^2.2.0",
40 | "gulp-declare": "^0.3.0",
41 | "gulp-header": "^1.2.2",
42 | "gulp-jshint": "^1.10.0",
43 | "gulp-less": "^3.0.1",
44 | "gulp-order": "^1.1.1",
45 | "gulp-rename": "^1.2.0",
46 | "gulp-uglify": "^1.1.0",
47 | "gulp-watch": "^4.1.1",
48 | "gulp-wrap": "^0.11.0",
49 | "handlebars": "^4.0.5",
50 | "http-server": "^0.8.0",
51 | "jshint-stylish": "^1.0.1",
52 | "karma": "0.13.19",
53 | "karma-chai": "0.1.0",
54 | "karma-chrome-launcher": "0.2.2",
55 | "karma-mocha": "0.2.1",
56 | "karma-phantomjs-launcher": "0.2.3",
57 | "karma-sinon-chai": "1.1.0",
58 | "less": "^2.4.0",
59 | "mocha": "^2.1.0",
60 | "phantomjs": "1.9.19",
61 | "selenium-webdriver": "^2.45.0",
62 | "sinon-chai": "2.8.0",
63 | "swagger-client": "2.1.22"
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/public/api_html/lang/ja.js:
--------------------------------------------------------------------------------
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 | "Example Value":"値の例",
32 | "Model Schema":"モデルスキーマ",
33 | "Model":"モデル",
34 | "Click to set as parameter value":"パラメータ値と設定するにはクリック",
35 | "apply":"実行",
36 | "Username":"ユーザ名",
37 | "Password":"パスワード",
38 | "Terms of service":"サービス利用規約",
39 | "Created by":"Created by",
40 | "See more at":"詳細を見る",
41 | "Contact the developer":"開発者に連絡",
42 | "api version":"APIバージョン",
43 | "Response Content Type":"レスポンス コンテンツタイプ",
44 | "Parameter content type:":"パラメータコンテンツタイプ:",
45 | "fetching resource":"リソースの取得",
46 | "fetching resource list":"リソース一覧の取得",
47 | "Explore":"調査",
48 | "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",
49 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.",
50 | "Please specify the protocol for":"プロトコルを指定してください",
51 | "Can't read swagger JSON from":"次からswagger JSONを読み込めません",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています",
53 | "Unable to read api":"APIを読み込めません",
54 | "from path":"次のパスから",
55 | "server returned":"サーバからの返答"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/src/main/javascript/view/AuthButtonView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | SwaggerUi.Views.AuthButtonView = Backbone.View.extend({
4 | events: {
5 | 'click .authorize__btn': 'authorizeBtnClick'
6 | },
7 |
8 | tpls: {
9 | popup: Handlebars.templates.popup,
10 | authBtn: Handlebars.templates.auth_button,
11 | authBtnOperation: Handlebars.templates.auth_button_operation
12 | },
13 |
14 | initialize: function(opts) {
15 | this.options = opts || {};
16 | this.options.data = this.options.data || {};
17 | this.isOperation = this.options.isOperation;
18 | this.model = this.model || {};
19 | this.router = this.options.router;
20 | this.auths = this.options.data.oauth2.concat(this.options.data.auths);
21 | },
22 |
23 | render: function () {
24 | var tplName = this.isOperation ? 'authBtnOperation' : 'authBtn';
25 |
26 | this.$authEl = this.renderAuths(this.auths);
27 | this.$el.html(this.tpls[tplName](this.model));
28 |
29 | return this;
30 | },
31 |
32 | authorizeBtnClick: function (e) {
33 | var authsModel;
34 |
35 | e.preventDefault();
36 |
37 | authsModel = {
38 | title: 'Available authorizations',
39 | content: this.$authEl
40 | };
41 |
42 | // The content of the popup is removed and all events unbound after clicking the 'Cancel' button of the popup.
43 | // We'll have to re-render the contents before creating a new popup view.
44 | this.render();
45 |
46 | this.popup = new SwaggerUi.Views.PopupView({model: authsModel});
47 | this.popup.render();
48 | },
49 |
50 | renderAuths: function (auths) {
51 | var $el = $('');
52 | var isLogout = false;
53 |
54 | auths.forEach(function (auth) {
55 | var authView = new SwaggerUi.Views.AuthView({data: auth, router: this.router});
56 | var authEl = authView.render().el;
57 | $el.append(authEl);
58 | if (authView.isLogout) {
59 | isLogout = true;
60 | }
61 | }, this);
62 |
63 | this.model.isLogout = isLogout;
64 |
65 | return $el;
66 | }
67 |
68 | });
69 |
--------------------------------------------------------------------------------
/public/api_html/src/main/javascript/view/ResourceView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | SwaggerUi.Views.ResourceView = Backbone.View.extend({
4 | initialize: function(opts) {
5 | opts = opts || {};
6 | this.router = opts.router;
7 | this.auths = opts.auths;
8 | if ('' === this.model.description) {
9 | this.model.description = null;
10 | }
11 | if (this.model.description) {
12 | this.model.summary = this.model.description;
13 | }
14 | this.number = 0;
15 | },
16 |
17 | render: function(){
18 | var methods = {};
19 |
20 |
21 | $(this.el).html(Handlebars.templates.resource(this.model));
22 |
23 | // Render each operation
24 | for (var i = 0; i < this.model.operationsArray.length; i++) {
25 | var operation = this.model.operationsArray[i];
26 | var counter = 0;
27 | var id = operation.nickname;
28 |
29 | while (typeof methods[id] !== 'undefined') {
30 | id = id + '_' + counter;
31 | counter += 1;
32 | }
33 |
34 | methods[id] = operation;
35 |
36 | operation.nickname = id;
37 | operation.parentId = this.model.id;
38 | operation.definitions = this.model.definitions; // make Json Schema available for JSonEditor in this operation
39 | this.addOperation(operation);
40 | }
41 |
42 | $('.toggleEndpointList', this.el).click(this.callDocs.bind(this, 'toggleEndpointListForResource'));
43 | $('.collapseResource', this.el).click(this.callDocs.bind(this, 'collapseOperationsForResource'));
44 | $('.expandResource', this.el).click(this.callDocs.bind(this, 'expandOperationsForResource'));
45 |
46 | return this;
47 | },
48 |
49 | addOperation: function(operation) {
50 |
51 | operation.number = this.number;
52 |
53 | // Render an operation and add it to operations li
54 | var operationView = new SwaggerUi.Views.OperationView({
55 | model: operation,
56 | router: this.router,
57 | tagName: 'li',
58 | className: 'endpoint',
59 | swaggerOptions: this.options.swaggerOptions,
60 | auths: this.auths
61 | });
62 |
63 | $('.endpoints', $(this.el)).append(operationView.render().el);
64 |
65 | this.number++;
66 |
67 | },
68 | // Generic Event handler (`Docs` is global)
69 |
70 |
71 | callDocs: function(fnName, e) {
72 | e.preventDefault();
73 | Docs[fnName](e.currentTarget.getAttribute('data-id'));
74 | }
75 | });
76 |
--------------------------------------------------------------------------------
/public/api_html/lang/tr.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Uyarı: Deprecated",
6 | "Implementation Notes":"Gerçekleştirim Notları",
7 | "Response Class":"Dönen Sınıf",
8 | "Status":"Statü",
9 | "Parameters":"Parametreler",
10 | "Parameter":"Parametre",
11 | "Value":"Değer",
12 | "Description":"Açıklama",
13 | "Parameter Type":"Parametre Tipi",
14 | "Data Type":"Veri Tipi",
15 | "Response Messages":"Dönüş Mesajı",
16 | "HTTP Status Code":"HTTP Statü Kodu",
17 | "Reason":"Gerekçe",
18 | "Response Model":"Dönüş Modeli",
19 | "Request URL":"İstek URL",
20 | "Response Body":"Dönüş İçeriği",
21 | "Response Code":"Dönüş Kodu",
22 | "Response Headers":"Dönüş Üst Bilgileri",
23 | "Hide Response":"Dönüşü Gizle",
24 | "Headers":"Üst Bilgiler",
25 | "Try it out!":"Dene!",
26 | "Show/Hide":"Göster/Gizle",
27 | "List Operations":"Operasyonları Listele",
28 | "Expand Operations":"Operasyonları Aç",
29 | "Raw":"Ham",
30 | "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç",
31 | "Model Schema":"Model Şema",
32 | "Model":"Model",
33 | "apply":"uygula",
34 | "Username":"Kullanıcı Adı",
35 | "Password":"Parola",
36 | "Terms of service":"Servis şartları",
37 | "Created by":"Oluşturan",
38 | "See more at":"Daha fazlası için",
39 | "Contact the developer":"Geliştirici ile İletişime Geçin",
40 | "api version":"api versiyon",
41 | "Response Content Type":"Dönüş İçerik Tipi",
42 | "fetching resource":"kaynak getiriliyor",
43 | "fetching resource list":"kaynak listesi getiriliyor",
44 | "Explore":"Keşfet",
45 | "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.",
47 | "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz",
48 | "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor",
50 | "Unable to read api":"api okunamadı",
51 | "from path":"yoldan",
52 | "server returned":"sunucuya dönüldü"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/tr.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Uyarı: Deprecated",
6 | "Implementation Notes":"Gerçekleştirim Notları",
7 | "Response Class":"Dönen Sınıf",
8 | "Status":"Statü",
9 | "Parameters":"Parametreler",
10 | "Parameter":"Parametre",
11 | "Value":"Değer",
12 | "Description":"Açıklama",
13 | "Parameter Type":"Parametre Tipi",
14 | "Data Type":"Veri Tipi",
15 | "Response Messages":"Dönüş Mesajı",
16 | "HTTP Status Code":"HTTP Statü Kodu",
17 | "Reason":"Gerekçe",
18 | "Response Model":"Dönüş Modeli",
19 | "Request URL":"İstek URL",
20 | "Response Body":"Dönüş İçeriği",
21 | "Response Code":"Dönüş Kodu",
22 | "Response Headers":"Dönüş Üst Bilgileri",
23 | "Hide Response":"Dönüşü Gizle",
24 | "Headers":"Üst Bilgiler",
25 | "Try it out!":"Dene!",
26 | "Show/Hide":"Göster/Gizle",
27 | "List Operations":"Operasyonları Listele",
28 | "Expand Operations":"Operasyonları Aç",
29 | "Raw":"Ham",
30 | "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç",
31 | "Model Schema":"Model Şema",
32 | "Model":"Model",
33 | "apply":"uygula",
34 | "Username":"Kullanıcı Adı",
35 | "Password":"Parola",
36 | "Terms of service":"Servis şartları",
37 | "Created by":"Oluşturan",
38 | "See more at":"Daha fazlası için",
39 | "Contact the developer":"Geliştirici ile İletişime Geçin",
40 | "api version":"api versiyon",
41 | "Response Content Type":"Dönüş İçerik Tipi",
42 | "fetching resource":"kaynak getiriliyor",
43 | "fetching resource list":"kaynak listesi getiriliyor",
44 | "Explore":"Keşfet",
45 | "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.",
47 | "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz",
48 | "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor",
50 | "Unable to read api":"api okunamadı",
51 | "from path":"yoldan",
52 | "server returned":"sunucuya dönüldü"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/lang/pl.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Uwaga: Wycofane",
6 | "Implementation Notes":"Uwagi Implementacji",
7 | "Response Class":"Klasa Odpowiedzi",
8 | "Status":"Status",
9 | "Parameters":"Parametry",
10 | "Parameter":"Parametr",
11 | "Value":"Wartość",
12 | "Description":"Opis",
13 | "Parameter Type":"Typ Parametru",
14 | "Data Type":"Typ Danych",
15 | "Response Messages":"Wiadomości Odpowiedzi",
16 | "HTTP Status Code":"Kod Statusu HTTP",
17 | "Reason":"Przyczyna",
18 | "Response Model":"Model Odpowiedzi",
19 | "Request URL":"URL Wywołania",
20 | "Response Body":"Treść Odpowiedzi",
21 | "Response Code":"Kod Odpowiedzi",
22 | "Response Headers":"Nagłówki Odpowiedzi",
23 | "Hide Response":"Ukryj Odpowiedź",
24 | "Headers":"Nagłówki",
25 | "Try it out!":"Wypróbuj!",
26 | "Show/Hide":"Pokaż/Ukryj",
27 | "List Operations":"Lista Operacji",
28 | "Expand Operations":"Rozwiń Operacje",
29 | "Raw":"Nieprzetworzone",
30 | "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane",
31 | "Model Schema":"Schemat Modelu",
32 | "Model":"Model",
33 | "apply":"użyj",
34 | "Username":"Nazwa użytkownika",
35 | "Password":"Hasło",
36 | "Terms of service":"Warunki używania",
37 | "Created by":"Utworzone przez",
38 | "See more at":"Zobacz więcej na",
39 | "Contact the developer":"Kontakt z deweloperem",
40 | "api version":"wersja api",
41 | "Response Content Type":"Typ Zasobu Odpowiedzi",
42 | "fetching resource":"ładowanie zasobu",
43 | "fetching resource list":"ładowanie listy zasobów",
44 | "Explore":"Eksploruj",
45 | "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.",
47 | "Please specify the protocol for":"Proszę podać protokół dla",
48 | "Can't read swagger JSON from":"Nie można odczytać swagger JSON z",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI",
50 | "Unable to read api":"Nie można odczytać api",
51 | "from path":"ze ścieżki",
52 | "server returned":"serwer zwrócił"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/pl.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Uwaga: Wycofane",
6 | "Implementation Notes":"Uwagi Implementacji",
7 | "Response Class":"Klasa Odpowiedzi",
8 | "Status":"Status",
9 | "Parameters":"Parametry",
10 | "Parameter":"Parametr",
11 | "Value":"Wartość",
12 | "Description":"Opis",
13 | "Parameter Type":"Typ Parametru",
14 | "Data Type":"Typ Danych",
15 | "Response Messages":"Wiadomości Odpowiedzi",
16 | "HTTP Status Code":"Kod Statusu HTTP",
17 | "Reason":"Przyczyna",
18 | "Response Model":"Model Odpowiedzi",
19 | "Request URL":"URL Wywołania",
20 | "Response Body":"Treść Odpowiedzi",
21 | "Response Code":"Kod Odpowiedzi",
22 | "Response Headers":"Nagłówki Odpowiedzi",
23 | "Hide Response":"Ukryj Odpowiedź",
24 | "Headers":"Nagłówki",
25 | "Try it out!":"Wypróbuj!",
26 | "Show/Hide":"Pokaż/Ukryj",
27 | "List Operations":"Lista Operacji",
28 | "Expand Operations":"Rozwiń Operacje",
29 | "Raw":"Nieprzetworzone",
30 | "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane",
31 | "Model Schema":"Schemat Modelu",
32 | "Model":"Model",
33 | "apply":"użyj",
34 | "Username":"Nazwa użytkownika",
35 | "Password":"Hasło",
36 | "Terms of service":"Warunki używania",
37 | "Created by":"Utworzone przez",
38 | "See more at":"Zobacz więcej na",
39 | "Contact the developer":"Kontakt z deweloperem",
40 | "api version":"wersja api",
41 | "Response Content Type":"Typ Zasobu Odpowiedzi",
42 | "fetching resource":"ładowanie zasobu",
43 | "fetching resource list":"ładowanie listy zasobów",
44 | "Explore":"Eksploruj",
45 | "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.",
47 | "Please specify the protocol for":"Proszę podać protokół dla",
48 | "Can't read swagger JSON from":"Nie można odczytać swagger JSON z",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI",
50 | "Unable to read api":"Nie można odczytać api",
51 | "from path":"ze ścieżki",
52 | "server returned":"serwer zwrócił"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/lang/pt.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Aviso: Depreciado",
6 | "Implementation Notes":"Notas de Implementação",
7 | "Response Class":"Classe de resposta",
8 | "Status":"Status",
9 | "Parameters":"Parâmetros",
10 | "Parameter":"Parâmetro",
11 | "Value":"Valor",
12 | "Description":"Descrição",
13 | "Parameter Type":"Tipo de parâmetro",
14 | "Data Type":"Tipo de dados",
15 | "Response Messages":"Mensagens de resposta",
16 | "HTTP Status Code":"Código de status HTTP",
17 | "Reason":"Razão",
18 | "Response Model":"Modelo resposta",
19 | "Request URL":"URL requisição",
20 | "Response Body":"Corpo da resposta",
21 | "Response Code":"Código da resposta",
22 | "Response Headers":"Cabeçalho da resposta",
23 | "Headers":"Cabeçalhos",
24 | "Hide Response":"Esconder resposta",
25 | "Try it out!":"Tente agora!",
26 | "Show/Hide":"Mostrar/Esconder",
27 | "List Operations":"Listar operações",
28 | "Expand Operations":"Expandir operações",
29 | "Raw":"Cru",
30 | "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
31 | "Model Schema":"Modelo esquema",
32 | "Model":"Modelo",
33 | "apply":"Aplicar",
34 | "Username":"Usuário",
35 | "Password":"Senha",
36 | "Terms of service":"Termos do serviço",
37 | "Created by":"Criado por",
38 | "See more at":"Veja mais em",
39 | "Contact the developer":"Contate o desenvolvedor",
40 | "api version":"Versão api",
41 | "Response Content Type":"Tipo de conteúdo da resposta",
42 | "fetching resource":"busca recurso",
43 | "fetching resource list":"buscando lista de recursos",
44 | "Explore":"Explorar",
45 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin",
47 | "Please specify the protocol for":"Por favor especifique o protocolo",
48 | "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI",
50 | "Unable to read api":"Não foi possível ler api",
51 | "from path":"do caminho",
52 | "server returned":"servidor retornou"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/pt.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Aviso: Depreciado",
6 | "Implementation Notes":"Notas de Implementação",
7 | "Response Class":"Classe de resposta",
8 | "Status":"Status",
9 | "Parameters":"Parâmetros",
10 | "Parameter":"Parâmetro",
11 | "Value":"Valor",
12 | "Description":"Descrição",
13 | "Parameter Type":"Tipo de parâmetro",
14 | "Data Type":"Tipo de dados",
15 | "Response Messages":"Mensagens de resposta",
16 | "HTTP Status Code":"Código de status HTTP",
17 | "Reason":"Razão",
18 | "Response Model":"Modelo resposta",
19 | "Request URL":"URL requisição",
20 | "Response Body":"Corpo da resposta",
21 | "Response Code":"Código da resposta",
22 | "Response Headers":"Cabeçalho da resposta",
23 | "Headers":"Cabeçalhos",
24 | "Hide Response":"Esconder resposta",
25 | "Try it out!":"Tente agora!",
26 | "Show/Hide":"Mostrar/Esconder",
27 | "List Operations":"Listar operações",
28 | "Expand Operations":"Expandir operações",
29 | "Raw":"Cru",
30 | "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru",
31 | "Model Schema":"Modelo esquema",
32 | "Model":"Modelo",
33 | "apply":"Aplicar",
34 | "Username":"Usuário",
35 | "Password":"Senha",
36 | "Terms of service":"Termos do serviço",
37 | "Created by":"Criado por",
38 | "See more at":"Veja mais em",
39 | "Contact the developer":"Contate o desenvolvedor",
40 | "api version":"Versão api",
41 | "Response Content Type":"Tipo de conteúdo da resposta",
42 | "fetching resource":"busca recurso",
43 | "fetching resource list":"buscando lista de recursos",
44 | "Explore":"Explorar",
45 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin",
47 | "Please specify the protocol for":"Por favor especifique o protocolo",
48 | "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI",
50 | "Unable to read api":"Não foi possível ler api",
51 | "from path":"do caminho",
52 | "server returned":"servidor retornou"
53 | });
54 |
--------------------------------------------------------------------------------
/spec/rails_helper.rb:
--------------------------------------------------------------------------------
1 | # This file is copied to spec/ when you run 'rails generate rspec:install'
2 | ENV["RAILS_ENV"] ||= 'test'
3 | require 'spec_helper'
4 | require File.expand_path("../../config/environment", __FILE__)
5 | require 'rspec/rails'
6 | # Add additional requires below this line. Rails is not loaded until this point!
7 |
8 | # Requires supporting ruby files with custom matchers and macros, etc, in
9 | # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
10 | # run as spec files by default. This means that files in spec/support that end
11 | # in _spec.rb will both be required and run as specs, causing the specs to be
12 | # run twice. It is recommended that you do not name files matching this glob to
13 | # end with _spec.rb. You can configure this pattern with the --pattern
14 | # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
15 | #
16 | # The following line is provided for convenience purposes. It has the downside
17 | # of increasing the boot-up time by auto-requiring all files in the support
18 | # directory. Alternatively, in the individual `*_spec.rb` files, manually
19 | # require only the support files necessary.
20 | #
21 | # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
22 |
23 | # Checks for pending migrations before tests are run.
24 | # If you are not using ActiveRecord, you can remove this line.
25 | ActiveRecord::Migration.maintain_test_schema!
26 |
27 | RSpec.configure do |config|
28 | # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
29 | config.fixture_path = "#{::Rails.root}/spec/fixtures"
30 |
31 | # If you're not using ActiveRecord, or you'd prefer not to run each of your
32 | # examples within a transaction, remove the following line or assign false
33 | # instead of true.
34 | config.use_transactional_fixtures = true
35 |
36 | # RSpec Rails can automatically mix in different behaviours to your tests
37 | # based on their file location, for example enabling you to call `get` and
38 | # `post` in specs under `spec/controllers`.
39 | #
40 | # You can disable this behaviour by removing the line below, and instead
41 | # explicitly tag your specs with their type, e.g.:
42 | #
43 | # RSpec.describe UsersController, :type => :controller do
44 | # # ...
45 | # end
46 | #
47 | # The different available types are documented in the features, such as in
48 | # https://relishapp.com/rspec/rspec-rails/docs
49 | config.infer_spec_type_from_file_location!
50 | end
51 |
--------------------------------------------------------------------------------
/public/api_html/src/main/javascript/view/SignatureView.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | SwaggerUi.Views.SignatureView = Backbone.View.extend({
4 | events: {
5 | 'click a.description-link' : 'switchToDescription',
6 | 'click a.snippet-link' : 'switchToSnippet',
7 | 'mousedown .snippet_json' : 'jsonSnippetMouseDown',
8 | 'mousedown .snippet_xml' : 'xmlSnippetMouseDown'
9 | },
10 |
11 | initialize: function () {
12 | },
13 |
14 | render: function(){
15 |
16 | $(this.el).html(Handlebars.templates.signature(this.model));
17 |
18 | if (this.model.defaultRendering === 'model') {
19 | this.switchToDescription();
20 | } else {
21 | this.switchToSnippet();
22 | }
23 |
24 | return this;
25 | },
26 |
27 | // handler for show signature
28 | switchToDescription: function(e){
29 | if (e) { e.preventDefault(); }
30 |
31 | $('.snippet', $(this.el)).hide();
32 | $('.description', $(this.el)).show();
33 | $('.description-link', $(this.el)).addClass('selected');
34 | $('.snippet-link', $(this.el)).removeClass('selected');
35 | },
36 |
37 | // handler for show sample
38 | switchToSnippet: function(e){
39 | if (e) { e.preventDefault(); }
40 |
41 | $('.snippet', $(this.el)).show();
42 | $('.description', $(this.el)).hide();
43 | $('.snippet-link', $(this.el)).addClass('selected');
44 | $('.description-link', $(this.el)).removeClass('selected');
45 | },
46 |
47 | // handler for snippet to text area
48 | snippetToTextArea: function(val) {
49 | var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));
50 |
51 | // Fix for bug in IE 10/11 which causes placeholder text to be copied to "value"
52 | if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) {
53 | textArea.val(val);
54 | // TODO move this code outside of the view and expose an event instead
55 | if( this.model.jsonEditor && this.model.jsonEditor.isEnabled()){
56 | this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON));
57 | }
58 | }
59 | },
60 |
61 | jsonSnippetMouseDown: function (e) {
62 | if (this.model.isParam) {
63 | if (e) { e.preventDefault(); }
64 |
65 | this.snippetToTextArea(this.model.sampleJSON);
66 | }
67 | },
68 |
69 | xmlSnippetMouseDown: function (e) {
70 | if (this.model.isParam) {
71 | if (e) { e.preventDefault(); }
72 |
73 | this.snippetToTextArea(this.model.sampleXML);
74 | }
75 | }
76 | });
--------------------------------------------------------------------------------
/public/api_html/lang/en.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Warning: Deprecated",
6 | "Implementation Notes":"Implementation Notes",
7 | "Response Class":"Response Class",
8 | "Status":"Status",
9 | "Parameters":"Parameters",
10 | "Parameter":"Parameter",
11 | "Value":"Value",
12 | "Description":"Description",
13 | "Parameter Type":"Parameter Type",
14 | "Data Type":"Data Type",
15 | "Response Messages":"Response Messages",
16 | "HTTP Status Code":"HTTP Status Code",
17 | "Reason":"Reason",
18 | "Response Model":"Response Model",
19 | "Request URL":"Request URL",
20 | "Response Body":"Response Body",
21 | "Response Code":"Response Code",
22 | "Response Headers":"Response Headers",
23 | "Hide Response":"Hide Response",
24 | "Headers":"Headers",
25 | "Try it out!":"Try it out!",
26 | "Show/Hide":"Show/Hide",
27 | "List Operations":"List Operations",
28 | "Expand Operations":"Expand Operations",
29 | "Raw":"Raw",
30 | "can't parse JSON. Raw result":"can't parse JSON. Raw result",
31 | "Example Value":"Example Value",
32 | "Model Schema":"Model Schema",
33 | "Model":"Model",
34 | "Click to set as parameter value":"Click to set as parameter value",
35 | "apply":"apply",
36 | "Username":"Username",
37 | "Password":"Password",
38 | "Terms of service":"Terms of service",
39 | "Created by":"Created by",
40 | "See more at":"See more at",
41 | "Contact the developer":"Contact the developer",
42 | "api version":"api version",
43 | "Response Content Type":"Response Content Type",
44 | "Parameter content type:":"Parameter content type:",
45 | "fetching resource":"fetching resource",
46 | "fetching resource list":"fetching resource list",
47 | "Explore":"Explore",
48 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
49 | "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.",
50 | "Please specify the protocol for":"Please specify the protocol for",
51 | "Can't read swagger JSON from":"Can't read swagger JSON from",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
53 | "Unable to read api":"Unable to read api",
54 | "from path":"from path",
55 | "server returned":"server returned"
56 | });
57 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | # Puma can serve each request in a thread from an internal thread pool.
2 | # The `threads` method setting takes two numbers a minimum and maximum.
3 | # Any libraries that use thread pools should be configured to match
4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 | # and maximum, this matches the default thread size of Active Record.
6 | #
7 | root = File.expand_path("../..", __FILE__)
8 |
9 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
10 | threads threads_count, threads_count
11 |
12 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
13 | #
14 | port ENV.fetch("PORT") { 3000 }
15 |
16 | # Set up socket location
17 | bind "unix://#{root}/tmp/sockets/puma.sock"
18 |
19 | # Logging
20 | # stdout_redirect "#{root}/log/puma.stdout.log", "#{root}/log/puma.stderr.log", true
21 |
22 | # Set master PID and state locations
23 | pidfile "#{root}/tmp/pids/puma.pid"
24 | state_path "#{root}/tmp/pids/puma.state"
25 | activate_control_app
26 |
27 | # Specifies the `environment` that Puma will run in.
28 | #
29 | environment ENV.fetch("RAILS_ENV") { "development" }
30 |
31 | # Specifies the number of `workers` to boot in clustered mode.
32 | # Workers are forked webserver processes. If using threads and workers together
33 | # the concurrency of the application would be max `threads` * `workers`.
34 | # Workers do not work on JRuby or Windows (both of which do not support
35 | # processes).
36 | #
37 | workers ENV.fetch("WEB_CONCURRENCY") { 5 }
38 |
39 | # Use the `preload_app!` method when specifying a `workers` number.
40 | # This directive tells Puma to first boot the application and load code
41 | # before forking the application. This takes advantage of Copy On Write
42 | # process behavior so workers use less memory. If you use this option
43 | # you need to make sure to reconnect any threads in the `on_worker_boot`
44 | # block.
45 | #
46 | preload_app!
47 |
48 | # The code in the `on_worker_boot` will be called if you are using
49 | # clustered mode by specifying a number of `workers`. After each worker
50 | # process is booted this block will be run, if you are using `preload_app!`
51 | # option you will want to use this block to reconnect to any threads
52 | # or connections that may have been created at application boot, Ruby
53 | # cannot share connections between processes.
54 |
55 | on_worker_boot do
56 | ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
57 | end
58 |
59 | # Allow puma to be restarted by `rails restart` command.
60 | plugin :tmp_restart
61 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/en.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Warning: Deprecated",
6 | "Implementation Notes":"Implementation Notes",
7 | "Response Class":"Response Class",
8 | "Status":"Status",
9 | "Parameters":"Parameters",
10 | "Parameter":"Parameter",
11 | "Value":"Value",
12 | "Description":"Description",
13 | "Parameter Type":"Parameter Type",
14 | "Data Type":"Data Type",
15 | "Response Messages":"Response Messages",
16 | "HTTP Status Code":"HTTP Status Code",
17 | "Reason":"Reason",
18 | "Response Model":"Response Model",
19 | "Request URL":"Request URL",
20 | "Response Body":"Response Body",
21 | "Response Code":"Response Code",
22 | "Response Headers":"Response Headers",
23 | "Hide Response":"Hide Response",
24 | "Headers":"Headers",
25 | "Try it out!":"Try it out!",
26 | "Show/Hide":"Show/Hide",
27 | "List Operations":"List Operations",
28 | "Expand Operations":"Expand Operations",
29 | "Raw":"Raw",
30 | "can't parse JSON. Raw result":"can't parse JSON. Raw result",
31 | "Example Value":"Example Value",
32 | "Model Schema":"Model Schema",
33 | "Model":"Model",
34 | "Click to set as parameter value":"Click to set as parameter value",
35 | "apply":"apply",
36 | "Username":"Username",
37 | "Password":"Password",
38 | "Terms of service":"Terms of service",
39 | "Created by":"Created by",
40 | "See more at":"See more at",
41 | "Contact the developer":"Contact the developer",
42 | "api version":"api version",
43 | "Response Content Type":"Response Content Type",
44 | "Parameter content type:":"Parameter content type:",
45 | "fetching resource":"fetching resource",
46 | "fetching resource list":"fetching resource list",
47 | "Explore":"Explore",
48 | "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
49 | "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.",
50 | "Please specify the protocol for":"Please specify the protocol for",
51 | "Can't read swagger JSON from":"Can't read swagger JSON from",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
53 | "Unable to read api":"Unable to read api",
54 | "from path":"from path",
55 | "server returned":"server returned"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/lang/ru.js:
--------------------------------------------------------------------------------
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 | "HTTP Status Code":"HTTP код",
16 | "Reason":"Причина",
17 | "Response Model":"Структура ответа",
18 | "Request URL":"URL запроса",
19 | "Response Body":"Тело ответа",
20 | "Response Code":"HTTP код ответа",
21 | "Response Headers":"Заголовки ответа",
22 | "Hide Response":"Спрятать ответ",
23 | "Headers":"Заголовки",
24 | "Response Messages":"Что может прийти в ответ",
25 | "Try it out!":"Попробовать!",
26 | "Show/Hide":"Показать/Скрыть",
27 | "List Operations":"Операции кратко",
28 | "Expand Operations":"Операции подробно",
29 | "Raw":"В сыром виде",
30 | "can't parse JSON. Raw result":"Не удается распарсить ответ:",
31 | "Example Value":"Пример",
32 | "Model Schema":"Структура",
33 | "Model":"Описание",
34 | "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра",
35 | "apply":"применить",
36 | "Username":"Имя пользователя",
37 | "Password":"Пароль",
38 | "Terms of service":"Условия использования",
39 | "Created by":"Разработано",
40 | "See more at":"Еще тут",
41 | "Contact the developer":"Связаться с разработчиком",
42 | "api version":"Версия API",
43 | "Response Content Type":"Content Type ответа",
44 | "Parameter content type:":"Content Type параметра:",
45 | "fetching resource":"Получение ресурса",
46 | "fetching resource list":"Получение ресурсов",
47 | "Explore":"Показать",
48 | "Show Swagger Petstore Example Apis":"Показать примеры АПИ",
49 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа",
50 | "Please specify the protocol for":"Пожалуйста, укажите протокол для",
51 | "Can't read swagger JSON from":"Не получается прочитать swagger json из",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",
53 | "Unable to read api":"Не удалось прочитать api",
54 | "from path":"по адресу",
55 | "server returned":"сервер сказал"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/ru.js:
--------------------------------------------------------------------------------
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 | "HTTP Status Code":"HTTP код",
16 | "Reason":"Причина",
17 | "Response Model":"Структура ответа",
18 | "Request URL":"URL запроса",
19 | "Response Body":"Тело ответа",
20 | "Response Code":"HTTP код ответа",
21 | "Response Headers":"Заголовки ответа",
22 | "Hide Response":"Спрятать ответ",
23 | "Headers":"Заголовки",
24 | "Response Messages":"Что может прийти в ответ",
25 | "Try it out!":"Попробовать!",
26 | "Show/Hide":"Показать/Скрыть",
27 | "List Operations":"Операции кратко",
28 | "Expand Operations":"Операции подробно",
29 | "Raw":"В сыром виде",
30 | "can't parse JSON. Raw result":"Не удается распарсить ответ:",
31 | "Example Value":"Пример",
32 | "Model Schema":"Структура",
33 | "Model":"Описание",
34 | "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра",
35 | "apply":"применить",
36 | "Username":"Имя пользователя",
37 | "Password":"Пароль",
38 | "Terms of service":"Условия использования",
39 | "Created by":"Разработано",
40 | "See more at":"Еще тут",
41 | "Contact the developer":"Связаться с разработчиком",
42 | "api version":"Версия API",
43 | "Response Content Type":"Content Type ответа",
44 | "Parameter content type:":"Content Type параметра:",
45 | "fetching resource":"Получение ресурса",
46 | "fetching resource list":"Получение ресурсов",
47 | "Explore":"Показать",
48 | "Show Swagger Petstore Example Apis":"Показать примеры АПИ",
49 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа",
50 | "Please specify the protocol for":"Пожалуйста, укажите протокол для",
51 | "Can't read swagger JSON from":"Не получается прочитать swagger json из",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",
53 | "Unable to read api":"Не удалось прочитать api",
54 | "from path":"по адресу",
55 | "server returned":"сервер сказал"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/lang/ca.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Advertència: Obsolet",
6 | "Implementation Notes":"Notes d'implementació",
7 | "Response Class":"Classe de la Resposta",
8 | "Status":"Estatus",
9 | "Parameters":"Paràmetres",
10 | "Parameter":"Paràmetre",
11 | "Value":"Valor",
12 | "Description":"Descripció",
13 | "Parameter Type":"Tipus del Paràmetre",
14 | "Data Type":"Tipus de la Dada",
15 | "Response Messages":"Missatges de la Resposta",
16 | "HTTP Status Code":"Codi d'Estatus HTTP",
17 | "Reason":"Raó",
18 | "Response Model":"Model de la Resposta",
19 | "Request URL":"URL de la Sol·licitud",
20 | "Response Body":"Cos de la Resposta",
21 | "Response Code":"Codi de la Resposta",
22 | "Response Headers":"Capçaleres de la Resposta",
23 | "Hide Response":"Amagar Resposta",
24 | "Try it out!":"Prova-ho!",
25 | "Show/Hide":"Mostrar/Amagar",
26 | "List Operations":"Llista Operacions",
27 | "Expand Operations":"Expandir Operacions",
28 | "Raw":"Cru",
29 | "can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
30 | "Example Value":"Valor d'Exemple",
31 | "Model Schema":"Esquema del Model",
32 | "Model":"Model",
33 | "apply":"aplicar",
34 | "Username":"Nom d'usuari",
35 | "Password":"Contrasenya",
36 | "Terms of service":"Termes del servei",
37 | "Created by":"Creat per",
38 | "See more at":"Veure més en",
39 | "Contact the developer":"Contactar amb el desenvolupador",
40 | "api version":"versió de la api",
41 | "Response Content Type":"Tipus de Contingut de la Resposta",
42 | "fetching resource":"recollint recurs",
43 | "fetching resource list":"recollins llista de recursos",
44 | "Explore":"Explorant",
45 | "Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
46 | "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.",
47 | "Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
48 | "Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
50 | "Unable to read api":"No es pot llegir l'api",
51 | "from path":"des de la ruta",
52 | "server returned":"el servidor ha retornat"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/ca.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Advertència: Obsolet",
6 | "Implementation Notes":"Notes d'implementació",
7 | "Response Class":"Classe de la Resposta",
8 | "Status":"Estatus",
9 | "Parameters":"Paràmetres",
10 | "Parameter":"Paràmetre",
11 | "Value":"Valor",
12 | "Description":"Descripció",
13 | "Parameter Type":"Tipus del Paràmetre",
14 | "Data Type":"Tipus de la Dada",
15 | "Response Messages":"Missatges de la Resposta",
16 | "HTTP Status Code":"Codi d'Estatus HTTP",
17 | "Reason":"Raó",
18 | "Response Model":"Model de la Resposta",
19 | "Request URL":"URL de la Sol·licitud",
20 | "Response Body":"Cos de la Resposta",
21 | "Response Code":"Codi de la Resposta",
22 | "Response Headers":"Capçaleres de la Resposta",
23 | "Hide Response":"Amagar Resposta",
24 | "Try it out!":"Prova-ho!",
25 | "Show/Hide":"Mostrar/Amagar",
26 | "List Operations":"Llista Operacions",
27 | "Expand Operations":"Expandir Operacions",
28 | "Raw":"Cru",
29 | "can't parse JSON. Raw result":"no puc analitzar el JSON. Resultat cru",
30 | "Example Value":"Valor d'Exemple",
31 | "Model Schema":"Esquema del Model",
32 | "Model":"Model",
33 | "apply":"aplicar",
34 | "Username":"Nom d'usuari",
35 | "Password":"Contrasenya",
36 | "Terms of service":"Termes del servei",
37 | "Created by":"Creat per",
38 | "See more at":"Veure més en",
39 | "Contact the developer":"Contactar amb el desenvolupador",
40 | "api version":"versió de la api",
41 | "Response Content Type":"Tipus de Contingut de la Resposta",
42 | "fetching resource":"recollint recurs",
43 | "fetching resource list":"recollins llista de recursos",
44 | "Explore":"Explorant",
45 | "Show Swagger Petstore Example Apis":"Mostrar API d'Exemple Swagger Petstore",
46 | "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.",
47 | "Please specify the protocol for":"Si us plau, especifiqueu el protocol per a",
48 | "Can't read swagger JSON from":"No es pot llegir el JSON de swagger des de",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Finalitzada la càrrega del recurs informatiu. Renderitzant Swagger UI",
50 | "Unable to read api":"No es pot llegir l'api",
51 | "from path":"des de la ruta",
52 | "server returned":"el servidor ha retornat"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/lang/geo.js:
--------------------------------------------------------------------------------
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 | "Example Value":"მაგალითი",
32 | "Model Schema":"მოდელის სტრუქტურა",
33 | "Model":"მოდელი",
34 | "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე",
35 | "apply":"გამოყენება",
36 | "Username":"მოხმარებელი",
37 | "Password":"პაროლი",
38 | "Terms of service":"მომსახურების პირობები",
39 | "Created by":"შექმნა",
40 | "See more at":"ნახე ვრცლად",
41 | "Contact the developer":"დაუკავშირდი დეველოპერს",
42 | "api version":"api ვერსია",
43 | "Response Content Type":"პასუხის კონტენტის ტიპი",
44 | "Parameter content type:":"პარამეტრის კონტენტის ტიპი:",
45 | "fetching resource":"რესურსების მიღება",
46 | "fetching resource list":"რესურსების სიის მიღება",
47 | "Explore":"ნახვა",
48 | "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api",
49 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.",
50 | "Please specify the protocol for":"მიუთითეთ პროტოკოლი",
51 | "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება",
53 | "Unable to read api":"api წაკითხვა ვერ მოხერხდა",
54 | "from path":"მისამართიდან",
55 | "server returned":"სერვერმა დააბრუნა"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/geo.js:
--------------------------------------------------------------------------------
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 | "Example Value":"მაგალითი",
32 | "Model Schema":"მოდელის სტრუქტურა",
33 | "Model":"მოდელი",
34 | "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე",
35 | "apply":"გამოყენება",
36 | "Username":"მოხმარებელი",
37 | "Password":"პაროლი",
38 | "Terms of service":"მომსახურების პირობები",
39 | "Created by":"შექმნა",
40 | "See more at":"ნახე ვრცლად",
41 | "Contact the developer":"დაუკავშირდი დეველოპერს",
42 | "api version":"api ვერსია",
43 | "Response Content Type":"პასუხის კონტენტის ტიპი",
44 | "Parameter content type:":"პარამეტრის კონტენტის ტიპი:",
45 | "fetching resource":"რესურსების მიღება",
46 | "fetching resource list":"რესურსების სიის მიღება",
47 | "Explore":"ნახვა",
48 | "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api",
49 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.",
50 | "Please specify the protocol for":"მიუთითეთ პროტოკოლი",
51 | "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა",
52 | "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება",
53 | "Unable to read api":"api წაკითხვა ვერ მოხერხდა",
54 | "from path":"მისამართიდან",
55 | "server returned":"სერვერმა დააბრუნა"
56 | });
57 |
--------------------------------------------------------------------------------
/public/api_html/lang/it.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Attenzione: Deprecato",
6 | "Implementation Notes":"Note di implementazione",
7 | "Response Class":"Classe della risposta",
8 | "Status":"Stato",
9 | "Parameters":"Parametri",
10 | "Parameter":"Parametro",
11 | "Value":"Valore",
12 | "Description":"Descrizione",
13 | "Parameter Type":"Tipo di parametro",
14 | "Data Type":"Tipo di dato",
15 | "Response Messages":"Messaggi della risposta",
16 | "HTTP Status Code":"Codice stato HTTP",
17 | "Reason":"Motivo",
18 | "Response Model":"Modello di risposta",
19 | "Request URL":"URL della richiesta",
20 | "Response Body":"Corpo della risposta",
21 | "Response Code":"Oggetto della risposta",
22 | "Response Headers":"Intestazioni della risposta",
23 | "Hide Response":"Nascondi risposta",
24 | "Try it out!":"Provalo!",
25 | "Show/Hide":"Mostra/Nascondi",
26 | "List Operations":"Mostra operazioni",
27 | "Expand Operations":"Espandi operazioni",
28 | "Raw":"Grezzo (raw)",
29 | "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",
30 | "Model Schema":"Schema del modello",
31 | "Model":"Modello",
32 | "apply":"applica",
33 | "Username":"Nome utente",
34 | "Password":"Password",
35 | "Terms of service":"Condizioni del servizio",
36 | "Created by":"Creato da",
37 | "See more at":"Informazioni aggiuntive:",
38 | "Contact the developer":"Contatta lo sviluppatore",
39 | "api version":"versione api",
40 | "Response Content Type":"Tipo di contenuto (content type) della risposta",
41 | "fetching resource":"recuperando la risorsa",
42 | "fetching resource list":"recuperando lista risorse",
43 | "Explore":"Esplora",
44 | "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",
45 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",
46 | "Please specify the protocol for":"Si prega di specificare il protocollo per",
47 | "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",
48 | "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",
49 | "Unable to read api":"Impossibile leggere la api",
50 | "from path":"da cartella",
51 | "server returned":"il server ha restituito"
52 | });
53 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/it.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Attenzione: Deprecato",
6 | "Implementation Notes":"Note di implementazione",
7 | "Response Class":"Classe della risposta",
8 | "Status":"Stato",
9 | "Parameters":"Parametri",
10 | "Parameter":"Parametro",
11 | "Value":"Valore",
12 | "Description":"Descrizione",
13 | "Parameter Type":"Tipo di parametro",
14 | "Data Type":"Tipo di dato",
15 | "Response Messages":"Messaggi della risposta",
16 | "HTTP Status Code":"Codice stato HTTP",
17 | "Reason":"Motivo",
18 | "Response Model":"Modello di risposta",
19 | "Request URL":"URL della richiesta",
20 | "Response Body":"Corpo della risposta",
21 | "Response Code":"Oggetto della risposta",
22 | "Response Headers":"Intestazioni della risposta",
23 | "Hide Response":"Nascondi risposta",
24 | "Try it out!":"Provalo!",
25 | "Show/Hide":"Mostra/Nascondi",
26 | "List Operations":"Mostra operazioni",
27 | "Expand Operations":"Espandi operazioni",
28 | "Raw":"Grezzo (raw)",
29 | "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",
30 | "Model Schema":"Schema del modello",
31 | "Model":"Modello",
32 | "apply":"applica",
33 | "Username":"Nome utente",
34 | "Password":"Password",
35 | "Terms of service":"Condizioni del servizio",
36 | "Created by":"Creato da",
37 | "See more at":"Informazioni aggiuntive:",
38 | "Contact the developer":"Contatta lo sviluppatore",
39 | "api version":"versione api",
40 | "Response Content Type":"Tipo di contenuto (content type) della risposta",
41 | "fetching resource":"recuperando la risorsa",
42 | "fetching resource list":"recuperando lista risorse",
43 | "Explore":"Esplora",
44 | "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",
45 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",
46 | "Please specify the protocol for":"Si prega di specificare il protocollo per",
47 | "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",
48 | "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",
49 | "Unable to read api":"Impossibile leggere la api",
50 | "from path":"da cartella",
51 | "server returned":"il server ha restituito"
52 | });
53 |
--------------------------------------------------------------------------------
/public/api_html/lang/es.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Advertencia: Obsoleto",
6 | "Implementation Notes":"Notas de implementación",
7 | "Response Class":"Clase de la Respuesta",
8 | "Status":"Status",
9 | "Parameters":"Parámetros",
10 | "Parameter":"Parámetro",
11 | "Value":"Valor",
12 | "Description":"Descripción",
13 | "Parameter Type":"Tipo del Parámetro",
14 | "Data Type":"Tipo del Dato",
15 | "Response Messages":"Mensajes de la Respuesta",
16 | "HTTP Status Code":"Código de Status HTTP",
17 | "Reason":"Razón",
18 | "Response Model":"Modelo de la Respuesta",
19 | "Request URL":"URL de la Solicitud",
20 | "Response Body":"Cuerpo de la Respuesta",
21 | "Response Code":"Código de la Respuesta",
22 | "Response Headers":"Encabezados de la Respuesta",
23 | "Hide Response":"Ocultar Respuesta",
24 | "Try it out!":"Pruébalo!",
25 | "Show/Hide":"Mostrar/Ocultar",
26 | "List Operations":"Listar Operaciones",
27 | "Expand Operations":"Expandir Operaciones",
28 | "Raw":"Crudo",
29 | "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
30 | "Example Value":"Valor de Ejemplo",
31 | "Model Schema":"Esquema del Modelo",
32 | "Model":"Modelo",
33 | "apply":"aplicar",
34 | "Username":"Nombre de usuario",
35 | "Password":"Contraseña",
36 | "Terms of service":"Términos de Servicio",
37 | "Created by":"Creado por",
38 | "See more at":"Ver más en",
39 | "Contact the developer":"Contactar al desarrollador",
40 | "api version":"versión de la api",
41 | "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",
42 | "fetching resource":"buscando recurso",
43 | "fetching resource list":"buscando lista del recurso",
44 | "Explore":"Explorar",
45 | "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",
47 | "Please specify the protocol for":"Por favor, especificar el protocola para",
48 | "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",
50 | "Unable to read api":"No se puede leer la api",
51 | "from path":"desde ruta",
52 | "server returned":"el servidor retornó"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/es.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Advertencia: Obsoleto",
6 | "Implementation Notes":"Notas de implementación",
7 | "Response Class":"Clase de la Respuesta",
8 | "Status":"Status",
9 | "Parameters":"Parámetros",
10 | "Parameter":"Parámetro",
11 | "Value":"Valor",
12 | "Description":"Descripción",
13 | "Parameter Type":"Tipo del Parámetro",
14 | "Data Type":"Tipo del Dato",
15 | "Response Messages":"Mensajes de la Respuesta",
16 | "HTTP Status Code":"Código de Status HTTP",
17 | "Reason":"Razón",
18 | "Response Model":"Modelo de la Respuesta",
19 | "Request URL":"URL de la Solicitud",
20 | "Response Body":"Cuerpo de la Respuesta",
21 | "Response Code":"Código de la Respuesta",
22 | "Response Headers":"Encabezados de la Respuesta",
23 | "Hide Response":"Ocultar Respuesta",
24 | "Try it out!":"Pruébalo!",
25 | "Show/Hide":"Mostrar/Ocultar",
26 | "List Operations":"Listar Operaciones",
27 | "Expand Operations":"Expandir Operaciones",
28 | "Raw":"Crudo",
29 | "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo",
30 | "Example Value":"Valor de Ejemplo",
31 | "Model Schema":"Esquema del Modelo",
32 | "Model":"Modelo",
33 | "apply":"aplicar",
34 | "Username":"Nombre de usuario",
35 | "Password":"Contraseña",
36 | "Terms of service":"Términos de Servicio",
37 | "Created by":"Creado por",
38 | "See more at":"Ver más en",
39 | "Contact the developer":"Contactar al desarrollador",
40 | "api version":"versión de la api",
41 | "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",
42 | "fetching resource":"buscando recurso",
43 | "fetching resource list":"buscando lista del recurso",
44 | "Explore":"Explorar",
45 | "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",
46 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",
47 | "Please specify the protocol for":"Por favor, especificar el protocola para",
48 | "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",
49 | "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",
50 | "Unable to read api":"No se puede leer la api",
51 | "from path":"desde ruta",
52 | "server returned":"el servidor retornó"
53 | });
54 |
--------------------------------------------------------------------------------
/public/api_html/lang/fr.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Avertissement : Obsolète",
6 | "Implementation Notes":"Notes d'implémentation",
7 | "Response Class":"Classe de la réponse",
8 | "Status":"Statut",
9 | "Parameters":"Paramètres",
10 | "Parameter":"Paramètre",
11 | "Value":"Valeur",
12 | "Description":"Description",
13 | "Parameter Type":"Type du paramètre",
14 | "Data Type":"Type de données",
15 | "Response Messages":"Messages de la réponse",
16 | "HTTP Status Code":"Code de statut HTTP",
17 | "Reason":"Raison",
18 | "Response Model":"Modèle de réponse",
19 | "Request URL":"URL appelée",
20 | "Response Body":"Corps de la réponse",
21 | "Response Code":"Code de la réponse",
22 | "Response Headers":"En-têtes de la réponse",
23 | "Hide Response":"Cacher la réponse",
24 | "Headers":"En-têtes",
25 | "Try it out!":"Testez !",
26 | "Show/Hide":"Afficher/Masquer",
27 | "List Operations":"Liste des opérations",
28 | "Expand Operations":"Développer les opérations",
29 | "Raw":"Brut",
30 | "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut",
31 | "Example Value":"Exemple la valeur",
32 | "Model Schema":"Définition du modèle",
33 | "Model":"Modèle",
34 | "apply":"appliquer",
35 | "Username":"Nom d'utilisateur",
36 | "Password":"Mot de passe",
37 | "Terms of service":"Conditions de service",
38 | "Created by":"Créé par",
39 | "See more at":"Voir plus sur",
40 | "Contact the developer":"Contacter le développeur",
41 | "api version":"version de l'api",
42 | "Response Content Type":"Content Type de la réponse",
43 | "fetching resource":"récupération de la ressource",
44 | "fetching resource list":"récupération de la liste de ressources",
45 | "Explore":"Explorer",
46 | "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",
47 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",
48 | "Please specify the protocol for":"Veuillez spécifier un protocole pour",
49 | "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",
50 | "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",
51 | "Unable to read api":"Impossible de lire l'api",
52 | "from path":"à partir du chemin",
53 | "server returned":"réponse du serveur"
54 | });
55 |
--------------------------------------------------------------------------------
/public/api_html/dist/lang/fr.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* jshint quotmark: double */
4 | window.SwaggerTranslator.learn({
5 | "Warning: Deprecated":"Avertissement : Obsolète",
6 | "Implementation Notes":"Notes d'implémentation",
7 | "Response Class":"Classe de la réponse",
8 | "Status":"Statut",
9 | "Parameters":"Paramètres",
10 | "Parameter":"Paramètre",
11 | "Value":"Valeur",
12 | "Description":"Description",
13 | "Parameter Type":"Type du paramètre",
14 | "Data Type":"Type de données",
15 | "Response Messages":"Messages de la réponse",
16 | "HTTP Status Code":"Code de statut HTTP",
17 | "Reason":"Raison",
18 | "Response Model":"Modèle de réponse",
19 | "Request URL":"URL appelée",
20 | "Response Body":"Corps de la réponse",
21 | "Response Code":"Code de la réponse",
22 | "Response Headers":"En-têtes de la réponse",
23 | "Hide Response":"Cacher la réponse",
24 | "Headers":"En-têtes",
25 | "Try it out!":"Testez !",
26 | "Show/Hide":"Afficher/Masquer",
27 | "List Operations":"Liste des opérations",
28 | "Expand Operations":"Développer les opérations",
29 | "Raw":"Brut",
30 | "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut",
31 | "Example Value":"Exemple la valeur",
32 | "Model Schema":"Définition du modèle",
33 | "Model":"Modèle",
34 | "apply":"appliquer",
35 | "Username":"Nom d'utilisateur",
36 | "Password":"Mot de passe",
37 | "Terms of service":"Conditions de service",
38 | "Created by":"Créé par",
39 | "See more at":"Voir plus sur",
40 | "Contact the developer":"Contacter le développeur",
41 | "api version":"version de l'api",
42 | "Response Content Type":"Content Type de la réponse",
43 | "fetching resource":"récupération de la ressource",
44 | "fetching resource list":"récupération de la liste de ressources",
45 | "Explore":"Explorer",
46 | "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",
47 | "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",
48 | "Please specify the protocol for":"Veuillez spécifier un protocole pour",
49 | "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",
50 | "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",
51 | "Unable to read api":"Impossible de lire l'api",
52 | "from path":"à partir du chemin",
53 | "server returned":"réponse du serveur"
54 | });
55 |
--------------------------------------------------------------------------------
/app/controllers/api/v1/users_controller.rb:
--------------------------------------------------------------------------------
1 | module Api::V1
2 | class UsersController < ApiController
3 | before_action :set_user, only: [:show, :update, :destroy]
4 |
5 | swagger_controller :users, "User Management"
6 |
7 | def self.add_common_params(api)
8 | api.param :form, "user[name]", :string, :optional, "Name"
9 | api.param :form, "user[email]", :string, :optional, "Email"
10 | end
11 |
12 | swagger_api :index do
13 | summary "Fetches all User items"
14 | notes "This lists all the active users"
15 | end
16 |
17 | swagger_api :show do
18 | summary "Fetches user by id"
19 | notes "Find user by id"
20 | param :path, :id, :integer, :optional, "User Id"
21 | response :unauthorized
22 | response :not_acceptable, "The request you made is not acceptable"
23 | response :requested_range_not_satisfiable
24 | end
25 |
26 | swagger_api :create do |api|
27 | summary "Create a new User item"
28 | notes "Notes for creating a new User item"
29 | Api::V1::UsersController::add_common_params(api)
30 | response :unauthorized
31 | response :not_acceptable, "The request you made is not acceptable"
32 | response :unprocessable_entity
33 | end
34 |
35 | swagger_api :update do |api|
36 | summary "Update a existed User item"
37 | notes "Notes for updating a existed User item"
38 | param :path, :id, :integer, :optional, "User Id"
39 | Api::V1::UsersController::add_common_params(api)
40 | response :unauthorized
41 | response :not_acceptable, "The request you made is not acceptable"
42 | response :unprocessable_entity
43 | end
44 |
45 | # GET /v1/users
46 | def index
47 | render json: User.all
48 | end
49 |
50 | def show
51 | user = User.find(params[:id])
52 | if user.present?
53 | render json: user
54 | else
55 | render json: { message: "User can't be found!" }
56 | end
57 | end
58 |
59 | # POST /users
60 | def create
61 | @user = User.new(user_params)
62 |
63 | if @user.save
64 | render json: @user, status: :created, location: @user
65 | else
66 | render json: @user.errors, status: :unprocessable_entity
67 | end
68 | end
69 |
70 | # PATCH/PUT /users/1
71 | def update
72 | if @user.update(user_params)
73 | render json: @user
74 | else
75 | render json: @user.errors, status: :unprocessable_entity
76 | end
77 | end
78 |
79 | # DELETE /users/1
80 | def destroy
81 | @user.destroy
82 | end
83 |
84 | private
85 | # Use callbacks to share common setup or constraints between actions.
86 | def set_user
87 | @user = User.find(params[:id])
88 | end
89 |
90 | # Only allow a trusted parameter "white list" through.
91 | def user_params
92 | params.require(:user).permit(:name, :email)
93 | end
94 |
95 | end
96 | end
97 |
--------------------------------------------------------------------------------
/public/api_html/src/main/javascript/view/AuthsCollection.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
4 | constructor: function() {
5 | var args = Array.prototype.slice.call(arguments);
6 |
7 | args[0] = this.parse(args[0]);
8 |
9 | Backbone.Collection.apply(this, args);
10 | },
11 |
12 | add: function (model) {
13 | var args = Array.prototype.slice.call(arguments);
14 |
15 | if (Array.isArray(model)) {
16 | args[0] = _.map(model, function(val) {
17 | return this.handleOne(val);
18 | }, this);
19 | } else {
20 | args[0] = this.handleOne(model);
21 | }
22 |
23 | Backbone.Collection.prototype.add.apply(this, args);
24 | },
25 |
26 | handleOne: function (model) {
27 | var result = model;
28 |
29 | if (! (model instanceof Backbone.Model) ) {
30 | switch (model.type) {
31 | case 'oauth2':
32 | result = new SwaggerUi.Models.Oauth2Model(model);
33 | break;
34 | case 'basic':
35 | result = new SwaggerUi.Models.BasicAuthModel(model);
36 | break;
37 | case 'apiKey':
38 | result = new SwaggerUi.Models.ApiKeyAuthModel(model);
39 | break;
40 | default:
41 | result = new Backbone.Model(model);
42 | }
43 | }
44 |
45 | return result;
46 | },
47 |
48 | isValid: function () {
49 | var valid = true;
50 |
51 | this.models.forEach(function(model) {
52 | if (!model.validate()) {
53 | valid = false;
54 | }
55 | });
56 |
57 | return valid;
58 | },
59 |
60 | isAuthorized: function () {
61 | return this.length === this.where({ isLogout: true }).length;
62 | },
63 |
64 | isPartiallyAuthorized: function () {
65 | return this.where({ isLogout: true }).length > 0;
66 | },
67 |
68 | parse: function (data) {
69 | var authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz);
70 |
71 | return _.map(data, function (auth, name) {
72 | var isBasic = authz[name] && auth.type === 'basic' && authz[name].username && authz[name].password;
73 |
74 | _.extend(auth, {
75 | title: name
76 | });
77 |
78 | if (authz[name] || isBasic) {
79 | _.extend(auth, {
80 | isLogout: true,
81 | value: isBasic ? undefined : authz[name].value,
82 | username: isBasic ? authz[name].username : undefined,
83 | password: isBasic ? authz[name].password : undefined,
84 | valid: true
85 | });
86 | }
87 |
88 | return auth;
89 | });
90 | }
91 | });
--------------------------------------------------------------------------------
/public/api_html/src/main/javascript/utils/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | window.SwaggerUi.utils = {
4 | parseSecurityDefinitions: function (security) {
5 | var auths = Object.assign({}, window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions);
6 | var oauth2Arr = [];
7 | var authsArr = [];
8 | var scopes = [];
9 | var utils = window.SwaggerUi.utils;
10 |
11 | if (!Array.isArray(security)) { return null; }
12 |
13 | security.forEach(function (item) {
14 | var singleSecurity = {};
15 | var singleOauth2Security = {};
16 |
17 | for (var key in item) {
18 | if (Array.isArray(item[key])) {
19 | if (!auths[key]) { continue; }
20 | auths[key] = auths[key] || {};
21 | if (auths[key].type === 'oauth2') {
22 | singleOauth2Security[key] = Object.assign({}, auths[key]);
23 | singleOauth2Security[key].scopes = Object.assign({}, auths[key].scopes);
24 | for (var i in singleOauth2Security[key].scopes) {
25 | if (item[key].indexOf(i) < 0) {
26 | delete singleOauth2Security[key].scopes[i];
27 | }
28 | }
29 | singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes);
30 | scopes = _.merge(scopes, singleOauth2Security[key].scopes);
31 | } else {
32 | singleSecurity[key] = Object.assign({}, auths[key]);
33 | }
34 | } else {
35 | if (item[key].type === 'oauth2') {
36 | singleOauth2Security[key] = Object.assign({}, item[key]);
37 | singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes);
38 | scopes = _.merge(scopes, singleOauth2Security[key].scopes);
39 | } else {
40 | singleSecurity[key] = item[key];
41 | }
42 | }
43 | }
44 |
45 | if (!_.isEmpty(singleSecurity)) {
46 | authsArr.push(singleSecurity);
47 | }
48 |
49 | if (!_.isEmpty(singleOauth2Security)){
50 | oauth2Arr.push(singleOauth2Security);
51 | }
52 | });
53 |
54 | return {
55 | auths : authsArr,
56 | oauth2: oauth2Arr,
57 | scopes: scopes
58 | };
59 | },
60 |
61 | parseOauth2Scopes: function (data) {
62 | var scopes = Object.assign({}, data);
63 | var result = [];
64 | var key;
65 |
66 | for (key in scopes) {
67 | result.push({scope: key, description: scopes[key]});
68 | }
69 |
70 | return result;
71 | },
72 |
73 | sanitize: function(html) {
74 | // Strip the script tags from the html and inline evenhandlers
75 | html = html.replace(/