rswag-ui 2.3.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c7a1191ef63e6b1b1c8f9e304a6e40ff455acfb0274f4c3b19479676770f028
4
- data.tar.gz: 91debd90bff05942fe06355a84d573002a225c1d936bb924bb63df35039a0fec
3
+ metadata.gz: cfb8dd44e70e7ed3f665577ecf7b1a224570fc4d23856fda660f5d9840551fb2
4
+ data.tar.gz: f0225e14d38fb41d6a3ad57cd7b3dc573b8c601a81ff0b618b91254a8b2c8e6d
5
5
  SHA512:
6
- metadata.gz: 63614df9513be4ccf6408c96d5008a927e50907cd3ec9854369c1ba125c4df9753eb4f99a0573e44590edd354d465ef55d95f911446847882e862b5e4138e223
7
- data.tar.gz: 878e77a5d86e27865a8e9e03d4ca0a443696fa40bc4bcfbf19d9193255dbc6eced95a5555eedc0417c5b0fb03726551349ad71602d7b53f656a0d3eac576170b
6
+ metadata.gz: e59d50cde145e38b58fc2a92b35989456a659b1fa9170ce52ea8049aea0005353e73b191800f5078053920f82af2cc0b3f8707b06831ac020f2ff7d897cfd600
7
+ data.tar.gz: 45a0d51bf1e8f325c596666673431d0fbd10b08116ea2933913cf06f9aaff120469910e0dcc797e4fd28083dd06c76657d6de891aae9f5dc36451e5011302152
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rswag-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richie Morris
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-01-28 00:00:00.000000000 Z
13
+ date: 2022-02-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: actionpack
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.1'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '7.0'
24
+ version: '7.1'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: '3.1'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '7.0'
34
+ version: '7.1'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: railties
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: '3.1'
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
- version: '7.0'
44
+ version: '7.1'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: '3.1'
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: '7.0'
54
+ version: '7.1'
55
55
  description: 'Expose beautiful API documentation, powered by Swagger JSON endpoints,
56
56
  including a UI to explore and test operations. More about the OpenAPI initiative
57
57
  here: http://spec.openapis.org/'
@@ -75,22 +75,6 @@ files:
75
75
  - lib/rswag/ui/index.erb
76
76
  - lib/rswag/ui/middleware.rb
77
77
  - lib/tasks/rswag-ui_tasks.rake
78
- - node_modules/swagger-ui-dist/README.md
79
- - node_modules/swagger-ui-dist/absolute-path.js
80
- - node_modules/swagger-ui-dist/favicon-16x16.png
81
- - node_modules/swagger-ui-dist/favicon-32x32.png
82
- - node_modules/swagger-ui-dist/index.html
83
- - node_modules/swagger-ui-dist/index.js
84
- - node_modules/swagger-ui-dist/oauth2-redirect.html
85
- - node_modules/swagger-ui-dist/package.json
86
- - node_modules/swagger-ui-dist/swagger-ui-bundle.js
87
- - node_modules/swagger-ui-dist/swagger-ui-bundle.js.map
88
- - node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js
89
- - node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js.map
90
- - node_modules/swagger-ui-dist/swagger-ui.css
91
- - node_modules/swagger-ui-dist/swagger-ui.css.map
92
- - node_modules/swagger-ui-dist/swagger-ui.js
93
- - node_modules/swagger-ui-dist/swagger-ui.js.map
94
78
  homepage: https://github.com/rswag/rswag
95
79
  licenses:
96
80
  - MIT
@@ -110,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
94
  - !ruby/object:Gem::Version
111
95
  version: '0'
112
96
  requirements: []
113
- rubygems_version: 3.0.6
97
+ rubygems_version: 3.3.3
114
98
  signing_key:
115
99
  specification_version: 4
116
100
  summary: A Rails Engine that includes swagger-ui and powers it from configured OpenAPI
@@ -1,22 +0,0 @@
1
- # Swagger UI Dist
2
- [![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)
3
-
4
- # API
5
-
6
- This module, `swagger-ui-dist`, exposes Swagger-UI's entire dist folder as a dependency-free npm module.
7
- Use `swagger-ui` instead, if you'd like to have npm install dependencies for you.
8
-
9
- `SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported:
10
- ```javascript
11
- import { SwaggerUIBundle, SwaggerUIStandalonePreset } from "swagger-ui-dist"
12
- ```
13
-
14
- To get an absolute path to this directory for static file serving, use the exported `getAbsoluteFSPath` method:
15
-
16
- ```javascript
17
- const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath()
18
-
19
- // then instantiate server that serves files from the swaggerUiAssetPath
20
- ```
21
-
22
- For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.
@@ -1,14 +0,0 @@
1
- /*
2
- * getAbsoluteFSPath
3
- * @return {string} When run in NodeJS env, returns the absolute path to the current directory
4
- * When run outside of NodeJS, will return an error message
5
- */
6
- const getAbsoluteFSPath = function () {
7
- // detect whether we are running in a browser or nodejs
8
- if (typeof module !== "undefined" && module.exports) {
9
- return require("path").resolve(__dirname)
10
- }
11
- throw new Error('getAbsoluteFSPath can only be called within a Nodejs environment');
12
- }
13
-
14
- module.exports = getAbsoluteFSPath
@@ -1,60 +0,0 @@
1
- <!-- HTML for static distribution bundle build -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>Swagger UI</title>
7
- <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
8
- <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
9
- <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
10
- <style>
11
- html
12
- {
13
- box-sizing: border-box;
14
- overflow: -moz-scrollbars-vertical;
15
- overflow-y: scroll;
16
- }
17
-
18
- *,
19
- *:before,
20
- *:after
21
- {
22
- box-sizing: inherit;
23
- }
24
-
25
- body
26
- {
27
- margin:0;
28
- background: #fafafa;
29
- }
30
- </style>
31
- </head>
32
-
33
- <body>
34
- <div id="swagger-ui"></div>
35
-
36
- <script src="./swagger-ui-bundle.js"> </script>
37
- <script src="./swagger-ui-standalone-preset.js"> </script>
38
- <script>
39
- window.onload = function() {
40
- // Begin Swagger UI call region
41
- const ui = SwaggerUIBundle({
42
- url: "https://petstore.swagger.io/v2/swagger.json",
43
- dom_id: '#swagger-ui',
44
- deepLinking: true,
45
- presets: [
46
- SwaggerUIBundle.presets.apis,
47
- SwaggerUIStandalonePreset
48
- ],
49
- plugins: [
50
- SwaggerUIBundle.plugins.DownloadUrl
51
- ],
52
- layout: "StandaloneLayout"
53
- })
54
- // End Swagger UI call region
55
-
56
- window.ui = ui
57
- }
58
- </script>
59
- </body>
60
- </html>
@@ -1,17 +0,0 @@
1
- try {
2
- module.exports.SwaggerUIBundle = require("./swagger-ui-bundle.js")
3
- module.exports.SwaggerUIStandalonePreset = require("./swagger-ui-standalone-preset.js")
4
- } catch(e) {
5
- // swallow the error if there's a problem loading the assets.
6
- // allows this module to support providing the assets for browserish contexts,
7
- // without exploding in a Node context.
8
- //
9
- // see https://github.com/swagger-api/swagger-ui/issues/3291#issuecomment-311195388
10
- // for more information.
11
- }
12
-
13
- // `absolutePath` and `getAbsoluteFSPath` are both here because at one point,
14
- // we documented having one and actually implemented the other.
15
- // They were both retained so we don't break anyone's code.
16
- module.exports.absolutePath = require("./absolute-path.js")
17
- module.exports.getAbsoluteFSPath = require("./absolute-path.js")
@@ -1,68 +0,0 @@
1
- <!doctype html>
2
- <html lang="en-US">
3
- <title>Swagger UI: OAuth2 Redirect</title>
4
- <body onload="run()">
5
- </body>
6
- </html>
7
- <script>
8
- 'use strict';
9
- function run () {
10
- var oauth2 = window.opener.swaggerUIRedirectOauth2;
11
- var sentState = oauth2.state;
12
- var redirectUrl = oauth2.redirectUrl;
13
- var isValid, qp, arr;
14
-
15
- if (/code|token|error/.test(window.location.hash)) {
16
- qp = window.location.hash.substring(1);
17
- } else {
18
- qp = location.search.substring(1);
19
- }
20
-
21
- arr = qp.split("&")
22
- arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
23
- qp = qp ? JSON.parse('{' + arr.join() + '}',
24
- function (key, value) {
25
- return key === "" ? value : decodeURIComponent(value)
26
- }
27
- ) : {}
28
-
29
- isValid = qp.state === sentState
30
-
31
- if ((
32
- oauth2.auth.schema.get("flow") === "accessCode"||
33
- oauth2.auth.schema.get("flow") === "authorizationCode"
34
- ) && !oauth2.auth.code) {
35
- if (!isValid) {
36
- oauth2.errCb({
37
- authId: oauth2.auth.name,
38
- source: "auth",
39
- level: "warning",
40
- message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
41
- });
42
- }
43
-
44
- if (qp.code) {
45
- delete oauth2.state;
46
- oauth2.auth.code = qp.code;
47
- oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
48
- } else {
49
- let oauthErrorMsg
50
- if (qp.error) {
51
- oauthErrorMsg = "["+qp.error+"]: " +
52
- (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
53
- (qp.error_uri ? "More info: "+qp.error_uri : "");
54
- }
55
-
56
- oauth2.errCb({
57
- authId: oauth2.auth.name,
58
- source: "auth",
59
- level: "error",
60
- message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
61
- });
62
- }
63
- } else {
64
- oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
65
- }
66
- window.close();
67
- }
68
- </script>
@@ -1,74 +0,0 @@
1
- {
2
- "_args": [
3
- [
4
- "swagger-ui-dist@3.28.0",
5
- "/home/travis/build/rswag/rswag/rswag-ui"
6
- ]
7
- ],
8
- "_from": "swagger-ui-dist@3.28.0",
9
- "_id": "swagger-ui-dist@3.28.0",
10
- "_inBundle": false,
11
- "_integrity": "sha512-aPkfTzPv9djSiZI1NUkWr5HynCUsH+jaJ0WSx+/t19wq7MMGg9clHm9nGoIpAtqml1G51ofI+I75Ym72pukzFg==",
12
- "_location": "/swagger-ui-dist",
13
- "_phantomChildren": {},
14
- "_requested": {
15
- "type": "version",
16
- "registry": true,
17
- "raw": "swagger-ui-dist@3.28.0",
18
- "name": "swagger-ui-dist",
19
- "escapedName": "swagger-ui-dist",
20
- "rawSpec": "3.28.0",
21
- "saveSpec": null,
22
- "fetchSpec": "3.28.0"
23
- },
24
- "_requiredBy": [
25
- "/"
26
- ],
27
- "_resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.28.0.tgz",
28
- "_spec": "3.28.0",
29
- "_where": "/home/travis/build/rswag/rswag/rswag-ui",
30
- "bugs": {
31
- "url": "https://github.com/swagger-api/swagger-ui/issues"
32
- },
33
- "contributors": [
34
- {
35
- "url": "in alphabetical order"
36
- },
37
- {
38
- "name": "Anna Bodnia",
39
- "email": "anna.bodnia@gmail.com"
40
- },
41
- {
42
- "name": "Buu Nguyen",
43
- "email": "buunguyen@gmail.com"
44
- },
45
- {
46
- "name": "Josh Ponelat",
47
- "email": "jponelat@gmail.com"
48
- },
49
- {
50
- "name": "Kyle Shockey",
51
- "email": "kyleshockey1@gmail.com"
52
- },
53
- {
54
- "name": "Robert Barnwell",
55
- "email": "robert@robertismy.name"
56
- },
57
- {
58
- "name": "Sahar Jafari",
59
- "email": "shr.jafari@gmail.com"
60
- }
61
- ],
62
- "dependencies": {},
63
- "description": "[![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)",
64
- "devDependencies": {},
65
- "homepage": "https://github.com/swagger-api/swagger-ui#readme",
66
- "license": "Apache-2.0",
67
- "main": "index.js",
68
- "name": "swagger-ui-dist",
69
- "repository": {
70
- "type": "git",
71
- "url": "git+ssh://git@github.com/swagger-api/swagger-ui.git"
72
- },
73
- "version": "3.28.0"
74
- }