Spaces:
Paused
Paused
Re-add Swagger dependencies (part 8)
Browse files- node_modules/swagger-ui-dist/LICENSE +202 -0
- node_modules/swagger-ui-dist/NOTICE +2 -0
- node_modules/swagger-ui-dist/README.md +40 -0
- node_modules/swagger-ui-dist/absolute-path.js +14 -0
- node_modules/swagger-ui-dist/favicon-16x16.png +0 -0
- node_modules/swagger-ui-dist/favicon-32x32.png +0 -0
- node_modules/swagger-ui-dist/index.css +16 -0
- node_modules/swagger-ui-dist/index.html +19 -0
- node_modules/swagger-ui-dist/index.js +17 -0
- node_modules/swagger-ui-dist/log.bundle-sizes.swagger-ui.txt +114 -0
- node_modules/swagger-ui-dist/log.es-bundle-core-sizes.swagger-ui.txt +14 -0
- node_modules/swagger-ui-dist/log.es-bundle-sizes.swagger-ui.txt +114 -0
- node_modules/swagger-ui-dist/oauth2-redirect.html +6 -0
- node_modules/swagger-ui-dist/oauth2-redirect.js +1 -0
- node_modules/swagger-ui-dist/package.json +20 -0
- node_modules/swagger-ui-dist/swagger-initializer.js +20 -0
- node_modules/swagger-ui-dist/swagger-ui-bundle.js +0 -0
- node_modules/swagger-ui-dist/swagger-ui-bundle.js.LICENSE.txt +106 -0
- node_modules/swagger-ui-dist/swagger-ui-bundle.js.map +0 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js +0 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js.LICENSE.txt +35 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js.map +0 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle.js +0 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle.js.LICENSE.txt +106 -0
- node_modules/swagger-ui-dist/swagger-ui-es-bundle.js.map +0 -0
- node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js +0 -0
- node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js.LICENSE.txt +22 -0
- node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js.map +0 -0
- node_modules/swagger-ui-dist/swagger-ui.css +0 -0
- node_modules/swagger-ui-dist/swagger-ui.css.map +0 -0
- node_modules/swagger-ui-dist/swagger-ui.js +0 -0
- node_modules/swagger-ui-dist/swagger-ui.js.map +0 -0
- node_modules/swagger-ui-express/LICENSE +22 -0
- node_modules/swagger-ui-express/README.md +360 -0
- node_modules/swagger-ui-express/index.js +311 -0
- node_modules/swagger-ui-express/package.json +58 -0
node_modules/swagger-ui-dist/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
node_modules/swagger-ui-dist/NOTICE
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
swagger-ui
|
| 2 |
+
Copyright 2020-2021 SmartBear Software Inc.
|
node_modules/swagger-ui-dist/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Swagger UI Dist
|
| 2 |
+
[](http://badge.fury.io/js/swagger-ui-dist)
|
| 3 |
+
|
| 4 |
+
## Anonymized analytics
|
| 5 |
+
|
| 6 |
+
SwaggerUI Dist uses [Scarf](https://scarf.sh/) to collect [anonymized installation analytics](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-what-information-does-scarf-js-send-about-me). These analytics help support the maintainers of this library and ONLY run during installation. To [opt out](https://github.com/scarf-sh/scarf-js?tab=readme-ov-file#as-a-user-of-a-package-using-scarf-js-how-can-i-opt-out-of-analytics), you can set the `scarfSettings.enabled` field to `false` in your project's `package.json`:
|
| 7 |
+
|
| 8 |
+
```
|
| 9 |
+
// package.json
|
| 10 |
+
{
|
| 11 |
+
// ...
|
| 12 |
+
"scarfSettings": {
|
| 13 |
+
"enabled": false
|
| 14 |
+
}
|
| 15 |
+
// ...
|
| 16 |
+
}
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
Alternatively, you can set the environment variable `SCARF_ANALYTICS` to `false` as part of the environment that installs your npm packages, e.g., `SCARF_ANALYTICS=false npm install`.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# API
|
| 23 |
+
|
| 24 |
+
This module, `swagger-ui-dist`, exposes Swagger-UI's entire dist folder as a dependency-free npm module.
|
| 25 |
+
Use `swagger-ui` instead, if you'd like to have npm install dependencies for you.
|
| 26 |
+
|
| 27 |
+
`SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported:
|
| 28 |
+
```javascript
|
| 29 |
+
import { SwaggerUIBundle, SwaggerUIStandalonePreset } from "swagger-ui-dist"
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
To get an absolute path to this directory for static file serving, use the exported `getAbsoluteFSPath` method:
|
| 33 |
+
|
| 34 |
+
```javascript
|
| 35 |
+
const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath()
|
| 36 |
+
|
| 37 |
+
// then instantiate server that serves files from the swaggerUiAssetPath
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.
|
node_modules/swagger-ui-dist/absolute-path.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
node_modules/swagger-ui-dist/favicon-16x16.png
ADDED
|
|
node_modules/swagger-ui-dist/favicon-32x32.png
ADDED
|
|
node_modules/swagger-ui-dist/index.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
html {
|
| 2 |
+
box-sizing: border-box;
|
| 3 |
+
overflow: -moz-scrollbars-vertical;
|
| 4 |
+
overflow-y: scroll;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
*,
|
| 8 |
+
*:before,
|
| 9 |
+
*:after {
|
| 10 |
+
box-sizing: inherit;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
body {
|
| 14 |
+
margin: 0;
|
| 15 |
+
background: #fafafa;
|
| 16 |
+
}
|
node_modules/swagger-ui-dist/index.html
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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="stylesheet" type="text/css" href="index.css" />
|
| 9 |
+
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
| 10 |
+
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
| 11 |
+
</head>
|
| 12 |
+
|
| 13 |
+
<body>
|
| 14 |
+
<div id="swagger-ui"></div>
|
| 15 |
+
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
|
| 16 |
+
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
| 17 |
+
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
|
| 18 |
+
</body>
|
| 19 |
+
</html>
|
node_modules/swagger-ui-dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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")
|
node_modules/swagger-ui-dist/log.bundle-sizes.swagger-ui.txt
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ramda: 367.12 KB (5.33%)
|
| 2 |
+
lodash: 256.63 KB (3.73%)
|
| 3 |
+
ramda-adjunct: 255.04 KB (3.70%)
|
| 4 |
+
autolinker: 203.32 KB (2.95%)
|
| 5 |
+
@swagger-api/apidom-ns-openapi-3-0: 192.76 KB (2.80%)
|
| 6 |
+
swagger-client: 176.74 KB (2.57%)
|
| 7 |
+
@swagger-api/apidom-ns-openapi-3-1: 142.98 KB (2.08%)
|
| 8 |
+
immutable: 139.22 KB (2.02%)
|
| 9 |
+
react-dom: 129.93 KB (1.89%)
|
| 10 |
+
remarkable: 125.56 KB (1.82%)
|
| 11 |
+
highlight.js: 111.85 KB (1.62%)
|
| 12 |
+
dompurify: 105.71 KB (1.54%)
|
| 13 |
+
@swagger-api/apidom-reference: 100.62 KB (1.46%)
|
| 14 |
+
readable-stream: 96.66 KB (1.40%)
|
| 15 |
+
js-yaml: 90.16 KB (1.31%)
|
| 16 |
+
core-js-pure: 87.18 KB (1.27%)
|
| 17 |
+
minim: 57.35 KB (0.833%)
|
| 18 |
+
buffer: 56.99 KB (0.828%)
|
| 19 |
+
@swagger-api/apidom-core: 54.17 KB (0.787%)
|
| 20 |
+
@swagger-api/apidom-ast: 53.99 KB (0.784%)
|
| 21 |
+
@swagger-api/apidom-ns-json-schema-draft-4: 52.01 KB (0.755%)
|
| 22 |
+
react-syntax-highlighter: 40.38 KB (0.586%)
|
| 23 |
+
apg-lite: 38.54 KB (0.560%)
|
| 24 |
+
short-unique-id: 37.48 KB (0.544%)
|
| 25 |
+
react-redux: 36.62 KB (0.532%)
|
| 26 |
+
@swaggerexpert/cookie: 35.16 KB (0.511%)
|
| 27 |
+
@swagger-api/apidom-ns-json-schema-2019-09: 35.04 KB (0.509%)
|
| 28 |
+
fast-json-patch: 31.89 KB (0.463%)
|
| 29 |
+
@swaggerexpert/json-pointer: 30.48 KB (0.443%)
|
| 30 |
+
@swagger-api/apidom-ns-json-schema-draft-7: 23.62 KB (0.343%)
|
| 31 |
+
@swagger-api/apidom-ns-json-schema-2020-12: 22.4 KB (0.325%)
|
| 32 |
+
@swagger-api/apidom-ns-json-schema-draft-6: 21.63 KB (0.314%)
|
| 33 |
+
reselect: 21.47 KB (0.312%)
|
| 34 |
+
openapi-path-templating: 20.81 KB (0.302%)
|
| 35 |
+
neotraverse: 20.33 KB (0.295%)
|
| 36 |
+
sha.js: 18.92 KB (0.275%)
|
| 37 |
+
ts-mixer: 17.56 KB (0.255%)
|
| 38 |
+
tslib: 17.23 KB (0.250%)
|
| 39 |
+
redux: 16.37 KB (0.238%)
|
| 40 |
+
url-parse: 16.23 KB (0.236%)
|
| 41 |
+
events: 14.54 KB (0.211%)
|
| 42 |
+
openapi-server-url-templating: 14.38 KB (0.209%)
|
| 43 |
+
get-intrinsic: 14.02 KB (0.204%)
|
| 44 |
+
zenscroll: 12.31 KB (0.179%)
|
| 45 |
+
react-debounce-input: 11.95 KB (0.174%)
|
| 46 |
+
react-immutable-proptypes: 11.82 KB (0.172%)
|
| 47 |
+
ret: 10.82 KB (0.157%)
|
| 48 |
+
lodash.debounce: 10.53 KB (0.153%)
|
| 49 |
+
unraw: 9.9 KB (0.144%)
|
| 50 |
+
string_decoder: 9.24 KB (0.134%)
|
| 51 |
+
xml: 7.39 KB (0.107%)
|
| 52 |
+
react-copy-to-clipboard: 7.33 KB (0.106%)
|
| 53 |
+
react: 6.95 KB (0.101%)
|
| 54 |
+
randexp: 6.15 KB (0.0893%)
|
| 55 |
+
react-immutable-pure-component: 6.01 KB (0.0872%)
|
| 56 |
+
redux-immutable: 5.43 KB (0.0789%)
|
| 57 |
+
process: 5.29 KB (0.0768%)
|
| 58 |
+
drange: 4.8 KB (0.0698%)
|
| 59 |
+
lowlight: 4.42 KB (0.0643%)
|
| 60 |
+
scheduler: 4.33 KB (0.0629%)
|
| 61 |
+
deep-extend: 4.19 KB (0.0609%)
|
| 62 |
+
@babel/runtime: 3.99 KB (0.0580%)
|
| 63 |
+
deepmerge: 3.95 KB (0.0574%)
|
| 64 |
+
base64-js: 3.84 KB (0.0558%)
|
| 65 |
+
stream-browserify: 3.76 KB (0.0546%)
|
| 66 |
+
which-typed-array: 3.64 KB (0.0529%)
|
| 67 |
+
@swagger-api/apidom-error: 3.45 KB (0.0501%)
|
| 68 |
+
copy-to-clipboard: 3.29 KB (0.0477%)
|
| 69 |
+
format: 3.26 KB (0.0473%)
|
| 70 |
+
is-callable: 3.15 KB (0.0457%)
|
| 71 |
+
css.escape: 3.08 KB (0.0447%)
|
| 72 |
+
to-buffer: 3.03 KB (0.0440%)
|
| 73 |
+
serialize-error: 2.93 KB (0.0425%)
|
| 74 |
+
use-sync-external-store: 2.81 KB (0.0409%)
|
| 75 |
+
prop-types: 2.6 KB (0.0378%)
|
| 76 |
+
querystringify: 2.5 KB (0.0364%)
|
| 77 |
+
for-each: 2.32 KB (0.0337%)
|
| 78 |
+
has-symbols: 2.31 KB (0.0336%)
|
| 79 |
+
define-data-property: 2.28 KB (0.0331%)
|
| 80 |
+
xml-but-prettier: 2.17 KB (0.0314%)
|
| 81 |
+
function-bind: 2.12 KB (0.0308%)
|
| 82 |
+
ieee754: 2.1 KB (0.0306%)
|
| 83 |
+
safe-buffer: 1.63 KB (0.0237%)
|
| 84 |
+
util-deprecate: 1.58 KB (0.0229%)
|
| 85 |
+
randombytes: 1.54 KB (0.0224%)
|
| 86 |
+
js-file-download: 1.52 KB (0.0221%)
|
| 87 |
+
classnames: 1.49 KB (0.0217%)
|
| 88 |
+
call-bind-apply-helpers: 1.35 KB (0.0196%)
|
| 89 |
+
set-function-length: 1.24 KB (0.0181%)
|
| 90 |
+
repeat-string: 1.18 KB (0.0172%)
|
| 91 |
+
get-proto: 1.1 KB (0.0160%)
|
| 92 |
+
dunder-proto: 980 B (0.0139%)
|
| 93 |
+
@babel/runtime-corejs3: 847 B (0.0120%)
|
| 94 |
+
math-intrinsics: 781 B (0.0111%)
|
| 95 |
+
toggle-selection: 780 B (0.0111%)
|
| 96 |
+
requires-port: 753 B (0.0107%)
|
| 97 |
+
inherits: 753 B (0.0107%)
|
| 98 |
+
@swagger-api/apidom-json-pointer: 709 B (0.0101%)
|
| 99 |
+
fault: 691 B (0.00980%)
|
| 100 |
+
call-bound: 667 B (0.00946%)
|
| 101 |
+
call-bind: 643 B (0.00912%)
|
| 102 |
+
typed-array-buffer: 591 B (0.00838%)
|
| 103 |
+
has-property-descriptors: 588 B (0.00834%)
|
| 104 |
+
es-errors: 524 B (0.00743%)
|
| 105 |
+
available-typed-arrays: 475 B (0.00674%)
|
| 106 |
+
gopd: 303 B (0.00430%)
|
| 107 |
+
es-define-property: 288 B (0.00409%)
|
| 108 |
+
possible-typed-array-names: 264 B (0.00374%)
|
| 109 |
+
hasown: 206 B (0.00292%)
|
| 110 |
+
has-tostringtag: 189 B (0.00268%)
|
| 111 |
+
is-typed-array: 180 B (0.00255%)
|
| 112 |
+
isarray: 132 B (0.00187%)
|
| 113 |
+
es-object-atoms: 67 B (0.000950%)
|
| 114 |
+
<self>: 3.18 MB (47.3%)
|
node_modules/swagger-ui-dist/log.es-bundle-core-sizes.swagger-ui.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
readable-stream: 96.66 KB (5.57%)
|
| 2 |
+
buffer: 56.99 KB (3.28%)
|
| 3 |
+
sha.js: 18.92 KB (1.09%)
|
| 4 |
+
events: 14.54 KB (0.837%)
|
| 5 |
+
string_decoder: 9.24 KB (0.532%)
|
| 6 |
+
xml: 7.39 KB (0.426%)
|
| 7 |
+
process: 5.29 KB (0.305%)
|
| 8 |
+
deep-extend: 4.19 KB (0.241%)
|
| 9 |
+
stream-browserify: 3.76 KB (0.216%)
|
| 10 |
+
safe-buffer: 1.63 KB (0.0939%)
|
| 11 |
+
util-deprecate: 1.58 KB (0.0908%)
|
| 12 |
+
randombytes: 1.54 KB (0.0887%)
|
| 13 |
+
inherits: 753 B (0.0423%)
|
| 14 |
+
<self>: 1.48 MB (87.2%)
|
node_modules/swagger-ui-dist/log.es-bundle-sizes.swagger-ui.txt
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ramda: 367.12 KB (5.33%)
|
| 2 |
+
lodash: 256.63 KB (3.73%)
|
| 3 |
+
ramda-adjunct: 255.04 KB (3.70%)
|
| 4 |
+
autolinker: 203.32 KB (2.95%)
|
| 5 |
+
@swagger-api/apidom-ns-openapi-3-0: 192.76 KB (2.80%)
|
| 6 |
+
swagger-client: 176.74 KB (2.57%)
|
| 7 |
+
@swagger-api/apidom-ns-openapi-3-1: 142.98 KB (2.08%)
|
| 8 |
+
immutable: 139.22 KB (2.02%)
|
| 9 |
+
react-dom: 129.93 KB (1.89%)
|
| 10 |
+
remarkable: 125.56 KB (1.82%)
|
| 11 |
+
highlight.js: 111.85 KB (1.62%)
|
| 12 |
+
dompurify: 105.71 KB (1.54%)
|
| 13 |
+
@swagger-api/apidom-reference: 100.62 KB (1.46%)
|
| 14 |
+
readable-stream: 96.66 KB (1.40%)
|
| 15 |
+
js-yaml: 90.16 KB (1.31%)
|
| 16 |
+
core-js-pure: 87.18 KB (1.27%)
|
| 17 |
+
minim: 57.35 KB (0.833%)
|
| 18 |
+
buffer: 56.99 KB (0.828%)
|
| 19 |
+
@swagger-api/apidom-core: 54.17 KB (0.787%)
|
| 20 |
+
@swagger-api/apidom-ast: 53.99 KB (0.784%)
|
| 21 |
+
@swagger-api/apidom-ns-json-schema-draft-4: 52.01 KB (0.755%)
|
| 22 |
+
react-syntax-highlighter: 40.38 KB (0.586%)
|
| 23 |
+
apg-lite: 38.54 KB (0.560%)
|
| 24 |
+
short-unique-id: 37.48 KB (0.544%)
|
| 25 |
+
react-redux: 36.62 KB (0.532%)
|
| 26 |
+
@swaggerexpert/cookie: 35.16 KB (0.511%)
|
| 27 |
+
@swagger-api/apidom-ns-json-schema-2019-09: 35.04 KB (0.509%)
|
| 28 |
+
fast-json-patch: 31.89 KB (0.463%)
|
| 29 |
+
@swaggerexpert/json-pointer: 30.48 KB (0.443%)
|
| 30 |
+
@swagger-api/apidom-ns-json-schema-draft-7: 23.62 KB (0.343%)
|
| 31 |
+
@swagger-api/apidom-ns-json-schema-2020-12: 22.4 KB (0.325%)
|
| 32 |
+
@swagger-api/apidom-ns-json-schema-draft-6: 21.63 KB (0.314%)
|
| 33 |
+
reselect: 21.47 KB (0.312%)
|
| 34 |
+
openapi-path-templating: 20.81 KB (0.302%)
|
| 35 |
+
neotraverse: 20.33 KB (0.295%)
|
| 36 |
+
sha.js: 18.92 KB (0.275%)
|
| 37 |
+
ts-mixer: 17.56 KB (0.255%)
|
| 38 |
+
tslib: 17.23 KB (0.250%)
|
| 39 |
+
redux: 16.37 KB (0.238%)
|
| 40 |
+
url-parse: 16.23 KB (0.236%)
|
| 41 |
+
events: 14.54 KB (0.211%)
|
| 42 |
+
openapi-server-url-templating: 14.38 KB (0.209%)
|
| 43 |
+
get-intrinsic: 14.02 KB (0.204%)
|
| 44 |
+
zenscroll: 12.31 KB (0.179%)
|
| 45 |
+
react-debounce-input: 11.95 KB (0.174%)
|
| 46 |
+
react-immutable-proptypes: 11.82 KB (0.172%)
|
| 47 |
+
ret: 10.82 KB (0.157%)
|
| 48 |
+
lodash.debounce: 10.53 KB (0.153%)
|
| 49 |
+
unraw: 9.9 KB (0.144%)
|
| 50 |
+
string_decoder: 9.24 KB (0.134%)
|
| 51 |
+
xml: 7.39 KB (0.107%)
|
| 52 |
+
react-copy-to-clipboard: 7.33 KB (0.106%)
|
| 53 |
+
react: 6.95 KB (0.101%)
|
| 54 |
+
randexp: 6.15 KB (0.0893%)
|
| 55 |
+
react-immutable-pure-component: 6.01 KB (0.0872%)
|
| 56 |
+
redux-immutable: 5.43 KB (0.0789%)
|
| 57 |
+
process: 5.29 KB (0.0768%)
|
| 58 |
+
drange: 4.8 KB (0.0698%)
|
| 59 |
+
lowlight: 4.42 KB (0.0643%)
|
| 60 |
+
scheduler: 4.33 KB (0.0629%)
|
| 61 |
+
deep-extend: 4.19 KB (0.0609%)
|
| 62 |
+
@babel/runtime: 3.99 KB (0.0580%)
|
| 63 |
+
deepmerge: 3.95 KB (0.0574%)
|
| 64 |
+
base64-js: 3.84 KB (0.0558%)
|
| 65 |
+
stream-browserify: 3.76 KB (0.0546%)
|
| 66 |
+
which-typed-array: 3.64 KB (0.0529%)
|
| 67 |
+
@swagger-api/apidom-error: 3.45 KB (0.0501%)
|
| 68 |
+
copy-to-clipboard: 3.29 KB (0.0477%)
|
| 69 |
+
format: 3.26 KB (0.0473%)
|
| 70 |
+
is-callable: 3.15 KB (0.0457%)
|
| 71 |
+
css.escape: 3.08 KB (0.0447%)
|
| 72 |
+
to-buffer: 3.03 KB (0.0440%)
|
| 73 |
+
serialize-error: 2.93 KB (0.0425%)
|
| 74 |
+
use-sync-external-store: 2.81 KB (0.0409%)
|
| 75 |
+
prop-types: 2.6 KB (0.0378%)
|
| 76 |
+
querystringify: 2.5 KB (0.0364%)
|
| 77 |
+
for-each: 2.32 KB (0.0337%)
|
| 78 |
+
has-symbols: 2.31 KB (0.0336%)
|
| 79 |
+
define-data-property: 2.28 KB (0.0331%)
|
| 80 |
+
xml-but-prettier: 2.17 KB (0.0314%)
|
| 81 |
+
function-bind: 2.12 KB (0.0308%)
|
| 82 |
+
ieee754: 2.1 KB (0.0306%)
|
| 83 |
+
safe-buffer: 1.63 KB (0.0237%)
|
| 84 |
+
util-deprecate: 1.58 KB (0.0229%)
|
| 85 |
+
randombytes: 1.54 KB (0.0224%)
|
| 86 |
+
js-file-download: 1.52 KB (0.0221%)
|
| 87 |
+
classnames: 1.49 KB (0.0217%)
|
| 88 |
+
call-bind-apply-helpers: 1.35 KB (0.0196%)
|
| 89 |
+
set-function-length: 1.24 KB (0.0181%)
|
| 90 |
+
repeat-string: 1.18 KB (0.0172%)
|
| 91 |
+
get-proto: 1.1 KB (0.0160%)
|
| 92 |
+
dunder-proto: 980 B (0.0139%)
|
| 93 |
+
@babel/runtime-corejs3: 847 B (0.0120%)
|
| 94 |
+
math-intrinsics: 781 B (0.0111%)
|
| 95 |
+
toggle-selection: 780 B (0.0111%)
|
| 96 |
+
requires-port: 753 B (0.0107%)
|
| 97 |
+
inherits: 753 B (0.0107%)
|
| 98 |
+
@swagger-api/apidom-json-pointer: 709 B (0.0101%)
|
| 99 |
+
fault: 691 B (0.00980%)
|
| 100 |
+
call-bound: 667 B (0.00946%)
|
| 101 |
+
call-bind: 643 B (0.00912%)
|
| 102 |
+
typed-array-buffer: 591 B (0.00838%)
|
| 103 |
+
has-property-descriptors: 588 B (0.00834%)
|
| 104 |
+
es-errors: 524 B (0.00743%)
|
| 105 |
+
available-typed-arrays: 475 B (0.00674%)
|
| 106 |
+
gopd: 303 B (0.00430%)
|
| 107 |
+
es-define-property: 288 B (0.00409%)
|
| 108 |
+
possible-typed-array-names: 264 B (0.00374%)
|
| 109 |
+
hasown: 206 B (0.00292%)
|
| 110 |
+
has-tostringtag: 189 B (0.00268%)
|
| 111 |
+
is-typed-array: 180 B (0.00255%)
|
| 112 |
+
isarray: 132 B (0.00187%)
|
| 113 |
+
es-object-atoms: 67 B (0.000950%)
|
| 114 |
+
<self>: 3.18 MB (47.3%)
|
node_modules/swagger-ui-dist/oauth2-redirect.html
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en-US">
|
| 3 |
+
<body>
|
| 4 |
+
<script src="oauth2-redirect.js"></script>
|
| 5 |
+
</body>
|
| 6 |
+
</html>
|
node_modules/swagger-ui-dist/oauth2-redirect.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";function run(){var e,r,t,a=window.opener.swaggerUIRedirectOauth2,o=a.state,n=a.redirectUrl;if((t=(r=/code|token|error/.test(window.location.hash)?window.location.hash.substring(1).replace("?","&"):location.search.substring(1)).split("&")).forEach((function(e,r,t){t[r]='"'+e.replace("=",'":"')+'"'})),e=(r=r?JSON.parse("{"+t.join()+"}",(function(e,r){return""===e?r:decodeURIComponent(r)})):{}).state===o,"accessCode"!==a.auth.schema.get("flow")&&"authorizationCode"!==a.auth.schema.get("flow")&&"authorization_code"!==a.auth.schema.get("flow")||a.auth.code)a.callback({auth:a.auth,token:r,isValid:e,redirectUrl:n});else if(e||a.errCb({authId:a.auth.name,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),r.code)delete a.state,a.auth.code=r.code,a.callback({auth:a.auth,redirectUrl:n});else{let e;r.error&&(e="["+r.error+"]: "+(r.error_description?r.error_description+". ":"no accessCode received from the server. ")+(r.error_uri?"More info: "+r.error_uri:"")),a.errCb({authId:a.auth.name,source:"auth",level:"error",message:e||"[Authorization failed]: no accessCode received from the server"})}window.close()}"loading"!==document.readyState?run():document.addEventListener("DOMContentLoaded",(function(){run()}));
|
node_modules/swagger-ui-dist/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "swagger-ui-dist",
|
| 3 |
+
"version": "5.32.8",
|
| 4 |
+
"main": "index.js",
|
| 5 |
+
"repository": "git@github.com:swagger-api/swagger-ui.git",
|
| 6 |
+
"contributors": [
|
| 7 |
+
"(in alphabetical order)",
|
| 8 |
+
"Anna Bodnia <anna.bodnia@gmail.com>",
|
| 9 |
+
"Buu Nguyen <buunguyen@gmail.com>",
|
| 10 |
+
"Josh Ponelat <jponelat@gmail.com>",
|
| 11 |
+
"Kyle Shockey <kyleshockey1@gmail.com>",
|
| 12 |
+
"Robert Barnwell <robert@robertismy.name>",
|
| 13 |
+
"Sahar Jafari <shr.jafari@gmail.com>"
|
| 14 |
+
],
|
| 15 |
+
"license": "Apache-2.0",
|
| 16 |
+
"dependencies": {
|
| 17 |
+
"@scarf/scarf": "=1.4.0"
|
| 18 |
+
},
|
| 19 |
+
"devDependencies": {}
|
| 20 |
+
}
|
node_modules/swagger-ui-dist/swagger-initializer.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
window.onload = function() {
|
| 2 |
+
//<editor-fold desc="Changeable Configuration Block">
|
| 3 |
+
|
| 4 |
+
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
|
| 5 |
+
window.ui = SwaggerUIBundle({
|
| 6 |
+
url: "https://petstore.swagger.io/v2/swagger.json",
|
| 7 |
+
dom_id: '#swagger-ui',
|
| 8 |
+
deepLinking: true,
|
| 9 |
+
presets: [
|
| 10 |
+
SwaggerUIBundle.presets.apis,
|
| 11 |
+
SwaggerUIStandalonePreset
|
| 12 |
+
],
|
| 13 |
+
plugins: [
|
| 14 |
+
SwaggerUIBundle.plugins.DownloadUrl
|
| 15 |
+
],
|
| 16 |
+
layout: "StandaloneLayout"
|
| 17 |
+
});
|
| 18 |
+
|
| 19 |
+
//</editor-fold>
|
| 20 |
+
};
|
node_modules/swagger-ui-dist/swagger-ui-bundle.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-bundle.js.LICENSE.txt
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
Copyright (c) 2018 Jed Watson.
|
| 3 |
+
Licensed under the MIT License (MIT), see
|
| 4 |
+
http://jedwatson.github.io/classnames
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
/*!
|
| 8 |
+
* @description Recursive object extending
|
| 9 |
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
| 10 |
+
* @license MIT
|
| 11 |
+
*
|
| 12 |
+
* The MIT License (MIT)
|
| 13 |
+
*
|
| 14 |
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
| 15 |
+
*
|
| 16 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 17 |
+
* this software and associated documentation files (the "Software"), to deal in
|
| 18 |
+
* the Software without restriction, including without limitation the rights to
|
| 19 |
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 20 |
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
| 21 |
+
* subject to the following conditions:
|
| 22 |
+
*
|
| 23 |
+
* The above copyright notice and this permission notice shall be included in all
|
| 24 |
+
* copies or substantial portions of the Software.
|
| 25 |
+
*
|
| 26 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 27 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 28 |
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 29 |
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 30 |
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 31 |
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
/*!
|
| 35 |
+
* The buffer module from node.js, for the browser.
|
| 36 |
+
*
|
| 37 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
| 38 |
+
* @license MIT
|
| 39 |
+
*/
|
| 40 |
+
|
| 41 |
+
/*!
|
| 42 |
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
| 43 |
+
* (c) 2017-2021 Joachim Wester
|
| 44 |
+
* MIT license
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
/*!
|
| 48 |
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
| 49 |
+
* (c) 2017-2022 Joachim Wester
|
| 50 |
+
* MIT licensed
|
| 51 |
+
*/
|
| 52 |
+
|
| 53 |
+
/*!
|
| 54 |
+
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
| 55 |
+
*
|
| 56 |
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
| 57 |
+
* Licensed under the MIT License.
|
| 58 |
+
*/
|
| 59 |
+
|
| 60 |
+
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
|
| 61 |
+
|
| 62 |
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 63 |
+
|
| 64 |
+
/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
|
| 65 |
+
|
| 66 |
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 67 |
+
|
| 68 |
+
/**
|
| 69 |
+
* @license React
|
| 70 |
+
* react-dom.production.min.js
|
| 71 |
+
*
|
| 72 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 73 |
+
*
|
| 74 |
+
* This source code is licensed under the MIT license found in the
|
| 75 |
+
* LICENSE file in the root directory of this source tree.
|
| 76 |
+
*/
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* @license React
|
| 80 |
+
* react.production.min.js
|
| 81 |
+
*
|
| 82 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 83 |
+
*
|
| 84 |
+
* This source code is licensed under the MIT license found in the
|
| 85 |
+
* LICENSE file in the root directory of this source tree.
|
| 86 |
+
*/
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* @license React
|
| 90 |
+
* scheduler.production.min.js
|
| 91 |
+
*
|
| 92 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 93 |
+
*
|
| 94 |
+
* This source code is licensed under the MIT license found in the
|
| 95 |
+
* LICENSE file in the root directory of this source tree.
|
| 96 |
+
*/
|
| 97 |
+
|
| 98 |
+
/**
|
| 99 |
+
* @license React
|
| 100 |
+
* use-sync-external-store-with-selector.production.js
|
| 101 |
+
*
|
| 102 |
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 103 |
+
*
|
| 104 |
+
* This source code is licensed under the MIT license found in the
|
| 105 |
+
* LICENSE file in the root directory of this source tree.
|
| 106 |
+
*/
|
node_modules/swagger-ui-dist/swagger-ui-bundle.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js.LICENSE.txt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
* @description Recursive object extending
|
| 3 |
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
| 4 |
+
* @license MIT
|
| 5 |
+
*
|
| 6 |
+
* The MIT License (MIT)
|
| 7 |
+
*
|
| 8 |
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
| 9 |
+
*
|
| 10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 11 |
+
* this software and associated documentation files (the "Software"), to deal in
|
| 12 |
+
* the Software without restriction, including without limitation the rights to
|
| 13 |
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 14 |
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
| 15 |
+
* subject to the following conditions:
|
| 16 |
+
*
|
| 17 |
+
* The above copyright notice and this permission notice shall be included in all
|
| 18 |
+
* copies or substantial portions of the Software.
|
| 19 |
+
*
|
| 20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 22 |
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 23 |
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 24 |
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 25 |
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 26 |
+
*/
|
| 27 |
+
|
| 28 |
+
/*!
|
| 29 |
+
* The buffer module from node.js, for the browser.
|
| 30 |
+
*
|
| 31 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
| 32 |
+
* @license MIT
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle-core.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle.js.LICENSE.txt
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
Copyright (c) 2018 Jed Watson.
|
| 3 |
+
Licensed under the MIT License (MIT), see
|
| 4 |
+
http://jedwatson.github.io/classnames
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
/*!
|
| 8 |
+
* @description Recursive object extending
|
| 9 |
+
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
| 10 |
+
* @license MIT
|
| 11 |
+
*
|
| 12 |
+
* The MIT License (MIT)
|
| 13 |
+
*
|
| 14 |
+
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
| 15 |
+
*
|
| 16 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
| 17 |
+
* this software and associated documentation files (the "Software"), to deal in
|
| 18 |
+
* the Software without restriction, including without limitation the rights to
|
| 19 |
+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
| 20 |
+
* the Software, and to permit persons to whom the Software is furnished to do so,
|
| 21 |
+
* subject to the following conditions:
|
| 22 |
+
*
|
| 23 |
+
* The above copyright notice and this permission notice shall be included in all
|
| 24 |
+
* copies or substantial portions of the Software.
|
| 25 |
+
*
|
| 26 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 27 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 28 |
+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
| 29 |
+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 30 |
+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
| 31 |
+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 32 |
+
*/
|
| 33 |
+
|
| 34 |
+
/*!
|
| 35 |
+
* The buffer module from node.js, for the browser.
|
| 36 |
+
*
|
| 37 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
| 38 |
+
* @license MIT
|
| 39 |
+
*/
|
| 40 |
+
|
| 41 |
+
/*!
|
| 42 |
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
| 43 |
+
* (c) 2017-2021 Joachim Wester
|
| 44 |
+
* MIT license
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
/*!
|
| 48 |
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
| 49 |
+
* (c) 2017-2022 Joachim Wester
|
| 50 |
+
* MIT licensed
|
| 51 |
+
*/
|
| 52 |
+
|
| 53 |
+
/*!
|
| 54 |
+
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
| 55 |
+
*
|
| 56 |
+
* Copyright (c) 2014-2015, Jon Schlinkert.
|
| 57 |
+
* Licensed under the MIT License.
|
| 58 |
+
*/
|
| 59 |
+
|
| 60 |
+
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
|
| 61 |
+
|
| 62 |
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 63 |
+
|
| 64 |
+
/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
|
| 65 |
+
|
| 66 |
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 67 |
+
|
| 68 |
+
/**
|
| 69 |
+
* @license React
|
| 70 |
+
* react-dom.production.min.js
|
| 71 |
+
*
|
| 72 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 73 |
+
*
|
| 74 |
+
* This source code is licensed under the MIT license found in the
|
| 75 |
+
* LICENSE file in the root directory of this source tree.
|
| 76 |
+
*/
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* @license React
|
| 80 |
+
* react.production.min.js
|
| 81 |
+
*
|
| 82 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 83 |
+
*
|
| 84 |
+
* This source code is licensed under the MIT license found in the
|
| 85 |
+
* LICENSE file in the root directory of this source tree.
|
| 86 |
+
*/
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* @license React
|
| 90 |
+
* scheduler.production.min.js
|
| 91 |
+
*
|
| 92 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 93 |
+
*
|
| 94 |
+
* This source code is licensed under the MIT license found in the
|
| 95 |
+
* LICENSE file in the root directory of this source tree.
|
| 96 |
+
*/
|
| 97 |
+
|
| 98 |
+
/**
|
| 99 |
+
* @license React
|
| 100 |
+
* use-sync-external-store-with-selector.production.js
|
| 101 |
+
*
|
| 102 |
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 103 |
+
*
|
| 104 |
+
* This source code is licensed under the MIT license found in the
|
| 105 |
+
* LICENSE file in the root directory of this source tree.
|
| 106 |
+
*/
|
node_modules/swagger-ui-dist/swagger-ui-es-bundle.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js.LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
* The buffer module from node.js, for the browser.
|
| 3 |
+
*
|
| 4 |
+
* @author Feross Aboukhadijeh <https://feross.org>
|
| 5 |
+
* @license MIT
|
| 6 |
+
*/
|
| 7 |
+
|
| 8 |
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 9 |
+
|
| 10 |
+
/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
|
| 11 |
+
|
| 12 |
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
| 13 |
+
|
| 14 |
+
/**
|
| 15 |
+
* @license React
|
| 16 |
+
* react.production.min.js
|
| 17 |
+
*
|
| 18 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 19 |
+
*
|
| 20 |
+
* This source code is licensed under the MIT license found in the
|
| 21 |
+
* LICENSE file in the root directory of this source tree.
|
| 22 |
+
*/
|
node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui.css
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui.css.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-dist/swagger-ui.js.map
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
node_modules/swagger-ui-express/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
The MIT License (MIT)
|
| 3 |
+
|
| 4 |
+
Copyright (c) 2018 Scott IT London
|
| 5 |
+
|
| 6 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 7 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 8 |
+
in the Software without restriction, including without limitation the rights
|
| 9 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 10 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 11 |
+
furnished to do so, subject to the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be included in
|
| 14 |
+
all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 17 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 18 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 19 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 20 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 21 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 22 |
+
THE SOFTWARE.
|
node_modules/swagger-ui-express/README.md
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Swagger UI Express
|
| 2 |
+
|
| 3 |
+
| Statements | Branches | Functions | Lines |
|
| 4 |
+
| --------------------------- | ----------------------- | ------------------------- | -------------------- |
|
| 5 |
+
|  |  |  |  |
|
| 6 |
+
|
| 7 |
+
This module allows you to serve auto-generated [swagger-ui](https://swagger.io/tools/swagger-ui/) generated API docs from express, based on a `swagger.json` file. The result is living documentation for your API hosted from your API server via a route.
|
| 8 |
+
|
| 9 |
+
Swagger version is pulled from npm module swagger-ui-dist. Please use a lock file or specify the version of swagger-ui-dist you want to ensure it is consistent across environments.
|
| 10 |
+
|
| 11 |
+
You may be also interested in:
|
| 12 |
+
|
| 13 |
+
* [swagger-jsdoc](https://github.com/Surnet/swagger-jsdoc): Allows you to markup routes
|
| 14 |
+
with jsdoc comments. It then produces a full swagger yml config dynamically, which you can pass to this module to produce documentation. See below under the usage section for more info.
|
| 15 |
+
* [swagger tools](https://github.com/swagger-api): Various tools, including swagger editor, swagger code gen etc.
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
Install using npm:
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
$ npm install swagger-ui-express
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
Express setup `app.js`
|
| 26 |
+
```javascript
|
| 27 |
+
const express = require('express');
|
| 28 |
+
const app = express();
|
| 29 |
+
const swaggerUi = require('swagger-ui-express');
|
| 30 |
+
const swaggerDocument = require('./swagger.json');
|
| 31 |
+
|
| 32 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
or if you are using Express router
|
| 36 |
+
|
| 37 |
+
```javascript
|
| 38 |
+
const router = require('express').Router();
|
| 39 |
+
const swaggerUi = require('swagger-ui-express');
|
| 40 |
+
const swaggerDocument = require('./swagger.json');
|
| 41 |
+
|
| 42 |
+
router.use('/api-docs', swaggerUi.serve);
|
| 43 |
+
router.get('/api-docs', swaggerUi.setup(swaggerDocument));
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Open http://`<app_host>`:`<app_port>`/api-docs in your browser to view the documentation.
|
| 47 |
+
|
| 48 |
+
If you want to set up routing based on the swagger document checkout [swagger-express-router](https://www.npmjs.com/package/swagger-express-router)
|
| 49 |
+
|
| 50 |
+
### [swagger-jsdoc](https://www.npmjs.com/package/swagger-jsdoc)
|
| 51 |
+
|
| 52 |
+
If you are using swagger-jsdoc simply pass the swaggerSpec into the setup function:
|
| 53 |
+
|
| 54 |
+
```javascript
|
| 55 |
+
// Initialize swagger-jsdoc -> returns validated swagger spec in json format
|
| 56 |
+
const swaggerSpec = swaggerJSDoc(options);
|
| 57 |
+
|
| 58 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
### Swagger Explorer
|
| 62 |
+
|
| 63 |
+
By default the Swagger Explorer bar is hidden, to display it pass true as the 'explorer' property of the options to the setup function:
|
| 64 |
+
|
| 65 |
+
```javascript
|
| 66 |
+
const express = require('express');
|
| 67 |
+
const app = express();
|
| 68 |
+
const swaggerUi = require('swagger-ui-express');
|
| 69 |
+
const swaggerDocument = require('./swagger.json');
|
| 70 |
+
|
| 71 |
+
var options = {
|
| 72 |
+
explorer: true
|
| 73 |
+
};
|
| 74 |
+
|
| 75 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
### Custom swagger options
|
| 79 |
+
|
| 80 |
+
To pass custom options e.g. validatorUrl, to the SwaggerUi client pass an object as the 'swaggerOptions' property of the options to the setup function:
|
| 81 |
+
|
| 82 |
+
```javascript
|
| 83 |
+
const express = require('express');
|
| 84 |
+
const app = express();
|
| 85 |
+
const swaggerUi = require('swagger-ui-express');
|
| 86 |
+
const swaggerDocument = require('./swagger.json');
|
| 87 |
+
|
| 88 |
+
var options = {
|
| 89 |
+
swaggerOptions: {
|
| 90 |
+
validatorUrl: null
|
| 91 |
+
}
|
| 92 |
+
};
|
| 93 |
+
|
| 94 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
For all the available options, refer to [Swagger UI Configuration](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md)
|
| 98 |
+
|
| 99 |
+
### Custom CSS styles
|
| 100 |
+
|
| 101 |
+
To customize the style of the swagger page, you can pass custom CSS as the 'customCss' property of the options to the setup function.
|
| 102 |
+
|
| 103 |
+
E.g. to hide the swagger header:
|
| 104 |
+
|
| 105 |
+
```javascript
|
| 106 |
+
const express = require('express');
|
| 107 |
+
const app = express();
|
| 108 |
+
const swaggerUi = require('swagger-ui-express');
|
| 109 |
+
const swaggerDocument = require('./swagger.json');
|
| 110 |
+
|
| 111 |
+
var options = {
|
| 112 |
+
customCss: '.swagger-ui .topbar { display: none }'
|
| 113 |
+
};
|
| 114 |
+
|
| 115 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
### Custom CSS styles from Url
|
| 119 |
+
|
| 120 |
+
You can also pass the url to a custom css file, the value must be the public url of the file and can be relative or absolute to the swagger path.
|
| 121 |
+
|
| 122 |
+
```javascript
|
| 123 |
+
const express = require('express');
|
| 124 |
+
const app = express();
|
| 125 |
+
const swaggerUi = require('swagger-ui-express');
|
| 126 |
+
const swaggerDocument = require('./swagger.json');
|
| 127 |
+
|
| 128 |
+
var options = {
|
| 129 |
+
customCssUrl: '/custom.css'
|
| 130 |
+
};
|
| 131 |
+
|
| 132 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
You can also pass an array of css urls to load multiple css files.
|
| 136 |
+
|
| 137 |
+
```javascript
|
| 138 |
+
const express = require('express');
|
| 139 |
+
const app = express();
|
| 140 |
+
const swaggerUi = require('swagger-ui-express');
|
| 141 |
+
const swaggerDocument = require('./swagger.json');
|
| 142 |
+
|
| 143 |
+
var options = {
|
| 144 |
+
customCssUrl: [
|
| 145 |
+
'/custom.css',
|
| 146 |
+
'https://example.com/other-custom.css'
|
| 147 |
+
]
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
### Custom JS
|
| 154 |
+
|
| 155 |
+
If you would like to have full control over your HTML you can provide your own javascript file, value accepts absolute or relative path. Value must be the public url of the js file.
|
| 156 |
+
|
| 157 |
+
```javascript
|
| 158 |
+
const express = require('express');
|
| 159 |
+
const app = express();
|
| 160 |
+
const swaggerUi = require('swagger-ui-express');
|
| 161 |
+
const swaggerDocument = require('./swagger.json');
|
| 162 |
+
|
| 163 |
+
var options = {
|
| 164 |
+
customJs: '/custom.js'
|
| 165 |
+
};
|
| 166 |
+
|
| 167 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
You can also pass an array of js urls to load multiple js files.
|
| 171 |
+
|
| 172 |
+
```javascript
|
| 173 |
+
const express = require('express');
|
| 174 |
+
const app = express();
|
| 175 |
+
const swaggerUi = require('swagger-ui-express');
|
| 176 |
+
const swaggerDocument = require('./swagger.json');
|
| 177 |
+
|
| 178 |
+
var options = {
|
| 179 |
+
customJs: [
|
| 180 |
+
'/custom.js',
|
| 181 |
+
'https://example.com/other-custom.js'
|
| 182 |
+
]
|
| 183 |
+
};
|
| 184 |
+
|
| 185 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
It is also possible to add inline javascript, either as string or array of string.
|
| 189 |
+
|
| 190 |
+
```javascript
|
| 191 |
+
const express = require('express');
|
| 192 |
+
const app = express();
|
| 193 |
+
const swaggerUi = require('swagger-ui-express');
|
| 194 |
+
const swaggerDocument = require('./swagger.json');
|
| 195 |
+
|
| 196 |
+
var options = {
|
| 197 |
+
customJsStr: 'console.log("Hello World")'
|
| 198 |
+
};
|
| 199 |
+
|
| 200 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
```javascript
|
| 204 |
+
const express = require('express');
|
| 205 |
+
const app = express();
|
| 206 |
+
const swaggerUi = require('swagger-ui-express');
|
| 207 |
+
const swaggerDocument = require('./swagger.json');
|
| 208 |
+
|
| 209 |
+
var options = {
|
| 210 |
+
customJsStr: [
|
| 211 |
+
'console.log("Hello World")',
|
| 212 |
+
`
|
| 213 |
+
var x = 1
|
| 214 |
+
console.log(x)
|
| 215 |
+
`
|
| 216 |
+
]
|
| 217 |
+
};
|
| 218 |
+
|
| 219 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument, options));
|
| 220 |
+
```
|
| 221 |
+
|
| 222 |
+
### Load swagger from url
|
| 223 |
+
|
| 224 |
+
To load your swagger from a url instead of injecting the document, pass `null` as the first parameter, and pass the relative or absolute URL as the 'url' property to 'swaggerOptions' in the setup function.
|
| 225 |
+
|
| 226 |
+
```javascript
|
| 227 |
+
const express = require('express');
|
| 228 |
+
const app = express();
|
| 229 |
+
const swaggerUi = require('swagger-ui-express');
|
| 230 |
+
|
| 231 |
+
var options = {
|
| 232 |
+
swaggerOptions: {
|
| 233 |
+
url: 'http://petstore.swagger.io/v2/swagger.json'
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(null, options));
|
| 238 |
+
```
|
| 239 |
+
|
| 240 |
+
To load multiple swagger documents from urls as a dropdown in the explorer bar, pass an array of object with `name` and `url` to 'urls' property to 'swaggerOptions' in the setup function.
|
| 241 |
+
|
| 242 |
+
```javascript
|
| 243 |
+
const express = require('express');
|
| 244 |
+
const app = express();
|
| 245 |
+
const swaggerUi = require('swagger-ui-express');
|
| 246 |
+
|
| 247 |
+
var options = {
|
| 248 |
+
explorer: true,
|
| 249 |
+
swaggerOptions: {
|
| 250 |
+
urls: [
|
| 251 |
+
{
|
| 252 |
+
url: 'http://petstore.swagger.io/v2/swagger.json',
|
| 253 |
+
name: 'Spec1'
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
url: 'http://petstore.swagger.io/v2/swagger.json',
|
| 257 |
+
name: 'Spec2'
|
| 258 |
+
}
|
| 259 |
+
]
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(null, options));
|
| 264 |
+
```
|
| 265 |
+
|
| 266 |
+
Make sure 'explorer' option is set to 'true' in your setup options for the dropdown to be visible.
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
### Load swagger from yaml file
|
| 270 |
+
|
| 271 |
+
To load your swagger specification yaml file you need to use a module able to convert yaml to json; for instance `yaml`.
|
| 272 |
+
|
| 273 |
+
npm install yaml
|
| 274 |
+
|
| 275 |
+
```javascript
|
| 276 |
+
const express = require('express');
|
| 277 |
+
const app = express();
|
| 278 |
+
const swaggerUi = require('swagger-ui-express');
|
| 279 |
+
const fs = require("fs")
|
| 280 |
+
const YAML = require('yaml')
|
| 281 |
+
|
| 282 |
+
const file = fs.readFileSync('./swagger.yaml', 'utf8')
|
| 283 |
+
const swaggerDocument = YAML.parse(file)
|
| 284 |
+
|
| 285 |
+
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
| 286 |
+
```
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
### Modify swagger file on the fly before load
|
| 290 |
+
|
| 291 |
+
To dynamically set the host, or any other content, in the swagger file based on the incoming request object you may pass the json via the req object; to achieve this just do not pass the the swagger json to the setup function and it will look for `swaggerDoc` in the `req` object.
|
| 292 |
+
|
| 293 |
+
```javascript
|
| 294 |
+
const express = require('express');
|
| 295 |
+
const app = express();
|
| 296 |
+
const swaggerUi = require('swagger-ui-express');
|
| 297 |
+
const swaggerDocument = require('./swagger.json');
|
| 298 |
+
|
| 299 |
+
var options = {}
|
| 300 |
+
|
| 301 |
+
app.use('/api-docs', function(req, res, next){
|
| 302 |
+
swaggerDocument.host = req.get('host');
|
| 303 |
+
req.swaggerDoc = swaggerDocument;
|
| 304 |
+
next();
|
| 305 |
+
}, swaggerUi.serveFiles(swaggerDocument, options), swaggerUi.setup());
|
| 306 |
+
```
|
| 307 |
+
|
| 308 |
+
### Two swagger documents
|
| 309 |
+
|
| 310 |
+
To run 2 swagger ui instances with different swagger documents, use the serveFiles function instead of the serve function. The serveFiles function has the same signature as the setup function.
|
| 311 |
+
|
| 312 |
+
```javascript
|
| 313 |
+
const express = require('express');
|
| 314 |
+
const app = express();
|
| 315 |
+
const swaggerUi = require('swagger-ui-express');
|
| 316 |
+
const swaggerDocumentOne = require('./swagger-one.json');
|
| 317 |
+
const swaggerDocumentTwo = require('./swagger-two.json');
|
| 318 |
+
|
| 319 |
+
var options = {}
|
| 320 |
+
|
| 321 |
+
app.use('/api-docs-one', swaggerUi.serveFiles(swaggerDocumentOne, options), swaggerUi.setup(swaggerDocumentOne));
|
| 322 |
+
|
| 323 |
+
app.use('/api-docs-two', swaggerUi.serveFiles(swaggerDocumentTwo, options), swaggerUi.setup(swaggerDocumentTwo));
|
| 324 |
+
|
| 325 |
+
app.use('/api-docs-dynamic', function(req, res, next){
|
| 326 |
+
req.swaggerDoc = swaggerDocument;
|
| 327 |
+
next();
|
| 328 |
+
}, swaggerUi.serveFiles(), swaggerUi.setup());
|
| 329 |
+
```
|
| 330 |
+
|
| 331 |
+
### Link to Swagger document
|
| 332 |
+
|
| 333 |
+
To render a link to the swagger document for downloading within the swagger ui - then serve the swagger doc as an endpoint and use the url option to point to it:
|
| 334 |
+
|
| 335 |
+
```javascript
|
| 336 |
+
const express = require('express');
|
| 337 |
+
const app = express();
|
| 338 |
+
const swaggerUi = require('swagger-ui-express');
|
| 339 |
+
const swaggerDocument = require('./swagger.json');
|
| 340 |
+
|
| 341 |
+
var options = {
|
| 342 |
+
swaggerOptions: {
|
| 343 |
+
url: "/api-docs/swagger.json",
|
| 344 |
+
},
|
| 345 |
+
}
|
| 346 |
+
app.get("/api-docs/swagger.json", (req, res) => res.json(swaggerDocument));
|
| 347 |
+
app.use('/api-docs', swaggerUi.serveFiles(null, options), swaggerUi.setup(null, options));
|
| 348 |
+
```
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
## Requirements
|
| 352 |
+
|
| 353 |
+
* Node v0.10.32 or above
|
| 354 |
+
* Express 4 or above
|
| 355 |
+
|
| 356 |
+
## Testing
|
| 357 |
+
|
| 358 |
+
* Install phantom
|
| 359 |
+
* `npm install`
|
| 360 |
+
* `npm test`
|
node_modules/swagger-ui-express/index.js
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict'
|
| 2 |
+
|
| 3 |
+
var express = require('express')
|
| 4 |
+
var getAbsoluteSwaggerFsPath = require('swagger-ui-dist/absolute-path')
|
| 5 |
+
var favIconHtml = '<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />' +
|
| 6 |
+
'<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />'
|
| 7 |
+
var swaggerInit = ''
|
| 8 |
+
|
| 9 |
+
function trimQuery(q) {
|
| 10 |
+
return q && q.split('?')[0]
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
var htmlTplString = `
|
| 14 |
+
<!-- HTML for static distribution bundle build -->
|
| 15 |
+
<!DOCTYPE html>
|
| 16 |
+
<html lang="en">
|
| 17 |
+
<head>
|
| 18 |
+
<meta charset="UTF-8">
|
| 19 |
+
<% robotsMetaString %>
|
| 20 |
+
<title><% title %></title>
|
| 21 |
+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
|
| 22 |
+
<% favIconString %>
|
| 23 |
+
<style>
|
| 24 |
+
html
|
| 25 |
+
{
|
| 26 |
+
box-sizing: border-box;
|
| 27 |
+
overflow: -moz-scrollbars-vertical;
|
| 28 |
+
overflow-y: scroll;
|
| 29 |
+
}
|
| 30 |
+
*,
|
| 31 |
+
*:before,
|
| 32 |
+
*:after
|
| 33 |
+
{
|
| 34 |
+
box-sizing: inherit;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
margin:0;
|
| 39 |
+
background: #fafafa;
|
| 40 |
+
}
|
| 41 |
+
</style>
|
| 42 |
+
</head>
|
| 43 |
+
|
| 44 |
+
<body>
|
| 45 |
+
|
| 46 |
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="position:absolute;width:0;height:0">
|
| 47 |
+
<defs>
|
| 48 |
+
<symbol viewBox="0 0 20 20" id="unlocked">
|
| 49 |
+
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"></path>
|
| 50 |
+
</symbol>
|
| 51 |
+
|
| 52 |
+
<symbol viewBox="0 0 20 20" id="locked">
|
| 53 |
+
<path d="M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"/>
|
| 54 |
+
</symbol>
|
| 55 |
+
|
| 56 |
+
<symbol viewBox="0 0 20 20" id="close">
|
| 57 |
+
<path d="M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"/>
|
| 58 |
+
</symbol>
|
| 59 |
+
|
| 60 |
+
<symbol viewBox="0 0 20 20" id="large-arrow">
|
| 61 |
+
<path d="M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"/>
|
| 62 |
+
</symbol>
|
| 63 |
+
|
| 64 |
+
<symbol viewBox="0 0 20 20" id="large-arrow-down">
|
| 65 |
+
<path d="M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"/>
|
| 66 |
+
</symbol>
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
<symbol viewBox="0 0 24 24" id="jump-to">
|
| 70 |
+
<path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/>
|
| 71 |
+
</symbol>
|
| 72 |
+
|
| 73 |
+
<symbol viewBox="0 0 24 24" id="expand">
|
| 74 |
+
<path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/>
|
| 75 |
+
</symbol>
|
| 76 |
+
|
| 77 |
+
</defs>
|
| 78 |
+
</svg>
|
| 79 |
+
|
| 80 |
+
<div id="swagger-ui"></div>
|
| 81 |
+
|
| 82 |
+
<script src="./swagger-ui-bundle.js"> </script>
|
| 83 |
+
<script src="./swagger-ui-standalone-preset.js"> </script>
|
| 84 |
+
<script src="./swagger-ui-init.js"> </script>
|
| 85 |
+
<% customJs %>
|
| 86 |
+
<% customJsStr %>
|
| 87 |
+
<% customCssUrl %>
|
| 88 |
+
<style>
|
| 89 |
+
<% customCss %>
|
| 90 |
+
</style>
|
| 91 |
+
</body>
|
| 92 |
+
|
| 93 |
+
</html>
|
| 94 |
+
`
|
| 95 |
+
|
| 96 |
+
var jsTplString = `
|
| 97 |
+
window.onload = function() {
|
| 98 |
+
// Build a system
|
| 99 |
+
var url = window.location.search.match(/url=([^&]+)/);
|
| 100 |
+
if (url && url.length > 1) {
|
| 101 |
+
url = decodeURIComponent(url[1]);
|
| 102 |
+
} else {
|
| 103 |
+
url = window.location.origin;
|
| 104 |
+
}
|
| 105 |
+
<% swaggerOptions %>
|
| 106 |
+
url = options.swaggerUrl || url
|
| 107 |
+
var urls = options.swaggerUrls
|
| 108 |
+
var customOptions = options.customOptions
|
| 109 |
+
var spec1 = options.swaggerDoc
|
| 110 |
+
var swaggerOptions = {
|
| 111 |
+
spec: spec1,
|
| 112 |
+
url: url,
|
| 113 |
+
urls: urls,
|
| 114 |
+
dom_id: '#swagger-ui',
|
| 115 |
+
deepLinking: true,
|
| 116 |
+
presets: [
|
| 117 |
+
SwaggerUIBundle.presets.apis,
|
| 118 |
+
SwaggerUIStandalonePreset
|
| 119 |
+
],
|
| 120 |
+
plugins: [
|
| 121 |
+
SwaggerUIBundle.plugins.DownloadUrl
|
| 122 |
+
],
|
| 123 |
+
layout: "StandaloneLayout"
|
| 124 |
+
}
|
| 125 |
+
for (var attrname in customOptions) {
|
| 126 |
+
swaggerOptions[attrname] = customOptions[attrname];
|
| 127 |
+
}
|
| 128 |
+
var ui = SwaggerUIBundle(swaggerOptions)
|
| 129 |
+
|
| 130 |
+
if (customOptions.oauth) {
|
| 131 |
+
ui.initOAuth(customOptions.oauth)
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
if (customOptions.preauthorizeApiKey) {
|
| 135 |
+
const key = customOptions.preauthorizeApiKey.authDefinitionKey;
|
| 136 |
+
const value = customOptions.preauthorizeApiKey.apiKeyValue;
|
| 137 |
+
if (!!key && !!value) {
|
| 138 |
+
const pid = setInterval(() => {
|
| 139 |
+
const authorized = ui.preauthorizeApiKey(key, value);
|
| 140 |
+
if(!!authorized) clearInterval(pid);
|
| 141 |
+
}, 500)
|
| 142 |
+
|
| 143 |
+
}
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
if (customOptions.authAction) {
|
| 147 |
+
ui.authActions.authorize(customOptions.authAction)
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
window.ui = ui
|
| 151 |
+
}
|
| 152 |
+
`
|
| 153 |
+
|
| 154 |
+
function toExternalScriptTag(url) {
|
| 155 |
+
return `<script src='${url}'></script>`
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
function toInlineScriptTag(jsCode) {
|
| 159 |
+
return `<script>${jsCode}</script>`
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
function toExternalStylesheetTag(url) {
|
| 163 |
+
return `<link href='${url}' rel='stylesheet'>`
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
function toTags(customCode, toScript) {
|
| 167 |
+
if (typeof customCode === 'string') {
|
| 168 |
+
return toScript(customCode)
|
| 169 |
+
} else if (Array.isArray(customCode)) {
|
| 170 |
+
return customCode.map(toScript).join('\n')
|
| 171 |
+
} else {
|
| 172 |
+
return ''
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
var generateHTML = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, _htmlTplString, _jsTplString) {
|
| 177 |
+
var isExplorer
|
| 178 |
+
var customJs
|
| 179 |
+
var customJsStr
|
| 180 |
+
var swaggerUrls
|
| 181 |
+
var customCssUrl
|
| 182 |
+
var customRobots
|
| 183 |
+
if (opts && typeof opts === 'object') {
|
| 184 |
+
options = opts.swaggerOptions
|
| 185 |
+
customCss = opts.customCss
|
| 186 |
+
customJs = opts.customJs
|
| 187 |
+
customJsStr = opts.customJsStr
|
| 188 |
+
customfavIcon = opts.customfavIcon
|
| 189 |
+
customRobots = opts.customRobots
|
| 190 |
+
swaggerUrl = opts.swaggerUrl
|
| 191 |
+
swaggerUrls = opts.swaggerUrls
|
| 192 |
+
isExplorer = opts.explorer || !!swaggerUrls
|
| 193 |
+
customSiteTitle = opts.customSiteTitle
|
| 194 |
+
customCssUrl = opts.customCssUrl
|
| 195 |
+
} else {
|
| 196 |
+
//support legacy params based function
|
| 197 |
+
isExplorer = opts
|
| 198 |
+
}
|
| 199 |
+
options = options || {}
|
| 200 |
+
var explorerString = isExplorer ? '' : '.swagger-ui .topbar .download-url-wrapper { display: none }'
|
| 201 |
+
customCss = explorerString + ' ' + customCss || explorerString
|
| 202 |
+
customfavIcon = customfavIcon || false
|
| 203 |
+
customSiteTitle = customSiteTitle || 'Swagger UI'
|
| 204 |
+
_htmlTplString = _htmlTplString || htmlTplString
|
| 205 |
+
_jsTplString = _jsTplString || jsTplString
|
| 206 |
+
|
| 207 |
+
var robotsMetaString = customRobots ? '<meta name="robots" content="' + customRobots + '" />' : ''
|
| 208 |
+
var favIconString = customfavIcon ? '<link rel="icon" href="' + customfavIcon + '" />' : favIconHtml
|
| 209 |
+
var htmlWithCustomCss = _htmlTplString.toString().replace('<% customCss %>', customCss)
|
| 210 |
+
var htmlWithCustomRobots = htmlWithCustomCss.replace('<% robotsMetaString %>', robotsMetaString)
|
| 211 |
+
var htmlWithFavIcon = htmlWithCustomRobots.replace('<% favIconString %>', favIconString)
|
| 212 |
+
var htmlWithCustomJsUrl = htmlWithFavIcon.replace('<% customJs %>', toTags(customJs, toExternalScriptTag))
|
| 213 |
+
var htmlWithCustomJs = htmlWithCustomJsUrl.replace('<% customJsStr %>', toTags(customJsStr, toInlineScriptTag))
|
| 214 |
+
var htmlWithCustomCssUrl = htmlWithCustomJs.replace('<% customCssUrl %>', toTags(customCssUrl, toExternalStylesheetTag))
|
| 215 |
+
|
| 216 |
+
var initOptions = {
|
| 217 |
+
swaggerDoc: swaggerDoc || undefined,
|
| 218 |
+
customOptions: options,
|
| 219 |
+
swaggerUrl: swaggerUrl || undefined,
|
| 220 |
+
swaggerUrls: swaggerUrls || undefined
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
swaggerInit = _jsTplString.toString().replace('<% swaggerOptions %>', stringify(initOptions))
|
| 224 |
+
return htmlWithCustomCssUrl.replace('<% title %>', customSiteTitle)
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
var setup = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle) {
|
| 228 |
+
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString)
|
| 229 |
+
return function (req, res) {
|
| 230 |
+
if (req.swaggerDoc) {
|
| 231 |
+
var reqHtml = generateHTML(req.swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString)
|
| 232 |
+
res.send(reqHtml)
|
| 233 |
+
} else {
|
| 234 |
+
res.send(html)
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
function swaggerInitFn(req, res, next) {
|
| 240 |
+
if (trimQuery(req.url).endsWith('/package.json')) {
|
| 241 |
+
res.sendStatus(404)
|
| 242 |
+
} else if (trimQuery(req.url).endsWith('/swagger-ui-init.js')) {
|
| 243 |
+
res.set('Content-Type', 'application/javascript')
|
| 244 |
+
res.send(swaggerInit)
|
| 245 |
+
} else {
|
| 246 |
+
next()
|
| 247 |
+
}
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
var swaggerInitFunction = function (swaggerDoc, opts) {
|
| 251 |
+
var swaggerInitFile = jsTplString.toString().replace('<% swaggerOptions %>', stringify(opts))
|
| 252 |
+
return function (req, res, next) {
|
| 253 |
+
if (trimQuery(req.url).endsWith('/package.json')) {
|
| 254 |
+
res.sendStatus(404)
|
| 255 |
+
} else if (trimQuery(req.url).endsWith('/swagger-ui-init.js')) {
|
| 256 |
+
if (req.swaggerDoc) {
|
| 257 |
+
opts.swaggerDoc = req.swaggerDoc
|
| 258 |
+
swaggerInitFile = jsTplString.toString().replace('<% swaggerOptions %>', stringify(opts))
|
| 259 |
+
}
|
| 260 |
+
res.set('Content-Type', 'application/javascript')
|
| 261 |
+
res.send(swaggerInitFile)
|
| 262 |
+
} else {
|
| 263 |
+
next()
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
var swaggerAssetMiddleware = options => {
|
| 269 |
+
var opts = options || {}
|
| 270 |
+
opts.index = false
|
| 271 |
+
return express.static(getAbsoluteSwaggerFsPath(), opts)
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
var serveFiles = function (swaggerDoc, opts) {
|
| 275 |
+
opts = opts || {}
|
| 276 |
+
var initOptions = {
|
| 277 |
+
swaggerDoc: swaggerDoc || undefined,
|
| 278 |
+
customOptions: opts.swaggerOptions || {},
|
| 279 |
+
swaggerUrl: opts.swaggerUrl || {},
|
| 280 |
+
swaggerUrls: opts.swaggerUrls || undefined
|
| 281 |
+
}
|
| 282 |
+
var swaggerInitWithOpts = swaggerInitFunction(swaggerDoc, initOptions)
|
| 283 |
+
return [swaggerInitWithOpts, swaggerAssetMiddleware()]
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
var serve = [swaggerInitFn, swaggerAssetMiddleware()]
|
| 287 |
+
var serveWithOptions = options => [swaggerInitFn, swaggerAssetMiddleware(options)]
|
| 288 |
+
|
| 289 |
+
var stringify = function (obj, prop) {
|
| 290 |
+
var placeholder = '____FUNCTIONPLACEHOLDER____'
|
| 291 |
+
var fns = []
|
| 292 |
+
var json = JSON.stringify(obj, function (key, value) {
|
| 293 |
+
if (typeof value === 'function') {
|
| 294 |
+
fns.push(value)
|
| 295 |
+
return placeholder
|
| 296 |
+
}
|
| 297 |
+
return value
|
| 298 |
+
}, 2)
|
| 299 |
+
json = json.replace(new RegExp('"' + placeholder + '"', 'g'), function (_) {
|
| 300 |
+
return fns.shift()
|
| 301 |
+
})
|
| 302 |
+
return 'var options = ' + json + ';'
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
module.exports = {
|
| 306 |
+
setup: setup,
|
| 307 |
+
serve: serve,
|
| 308 |
+
serveWithOptions: serveWithOptions,
|
| 309 |
+
generateHTML: generateHTML,
|
| 310 |
+
serveFiles: serveFiles
|
| 311 |
+
}
|
node_modules/swagger-ui-express/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "swagger-ui-express",
|
| 3 |
+
"version": "5.0.1",
|
| 4 |
+
"description": "Swagger UI Express",
|
| 5 |
+
"main": "./index.js",
|
| 6 |
+
"files": [
|
| 7 |
+
"package.json",
|
| 8 |
+
"index.js",
|
| 9 |
+
"indexTemplate.html.tpl",
|
| 10 |
+
"swagger-ui-init.js.tpl",
|
| 11 |
+
"LICENSE"
|
| 12 |
+
],
|
| 13 |
+
"scripts": {
|
| 14 |
+
"test": "./node_modules/.bin/mocha test/*.spec.js",
|
| 15 |
+
"coverage:report": "nyc ./node_modules/.bin/mocha test/* || exit 0",
|
| 16 |
+
"coverage:badge": "npm run coverage:report && istanbul-badges-readme --coverageDir='./coverage'",
|
| 17 |
+
"test-app": "node ./test/testapp/run.js "
|
| 18 |
+
},
|
| 19 |
+
"keywords": [
|
| 20 |
+
"swagger",
|
| 21 |
+
"express",
|
| 22 |
+
"ui",
|
| 23 |
+
"json",
|
| 24 |
+
"documentation"
|
| 25 |
+
],
|
| 26 |
+
"private": false,
|
| 27 |
+
"engines": {
|
| 28 |
+
"node": ">= v0.10.32"
|
| 29 |
+
},
|
| 30 |
+
"devDependencies": {
|
| 31 |
+
"es6-shim": "0.35.8",
|
| 32 |
+
"express": "^4.19.2",
|
| 33 |
+
"istanbul-badges-readme": "^1.9.0",
|
| 34 |
+
"mocha": "^10.4.0",
|
| 35 |
+
"nyc": "^15.1.0",
|
| 36 |
+
"puppeteer": "22.8.2"
|
| 37 |
+
},
|
| 38 |
+
"author": {
|
| 39 |
+
"name": "Stephen Scott",
|
| 40 |
+
"email": "scottie1984@gmail.com"
|
| 41 |
+
},
|
| 42 |
+
"repository": {
|
| 43 |
+
"type": "git",
|
| 44 |
+
"url": "git@github.com:scottie1984/swagger-ui-express.git"
|
| 45 |
+
},
|
| 46 |
+
"license": "MIT",
|
| 47 |
+
"readmeFilename": "README.md",
|
| 48 |
+
"bugs": {
|
| 49 |
+
"url": "https://github.com/scottie1984/swagger-ui-express/issues"
|
| 50 |
+
},
|
| 51 |
+
"homepage": "https://github.com/scottie1984/swagger-ui-express",
|
| 52 |
+
"dependencies": {
|
| 53 |
+
"swagger-ui-dist": ">=5.0.0"
|
| 54 |
+
},
|
| 55 |
+
"peerDependencies": {
|
| 56 |
+
"express": ">=4.0.0 || >=5.0.0-beta"
|
| 57 |
+
}
|
| 58 |
+
}
|