rapidoc 9.3.7 → 10.0.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.
- package/README.md +193 -61
- package/dist/rapidoc-min.js +279 -3912
- package/package.json +24 -47
- package/.babelrc.json +0 -42
- package/.eslintrc +0 -53
- package/.github/FUNDING.yml +0 -13
- package/.github/workflow/words.yaml +0 -22
- package/CONTRIBUTING.md +0 -35
- package/dist/index.html +0 -6
- package/dist/index.html.gz +0 -0
- package/dist/rapidoc-min.js.LICENSE.txt +0 -64
- package/dist/rapidoc-min.js.LICENSE.txt.gz +0 -0
- package/dist/rapidoc-min.js.gz +0 -0
- package/dist/rapidoc-min.js.map +0 -1
- package/dist/rapidoc-min.js.map.gz +0 -0
- package/dist/rapidoc.js +0 -21594
- package/dist/report.html +0 -39
- package/index-hashroute.html +0 -65
- package/index.html +0 -249
- package/index1.html +0 -244
- package/jsconfig.json +0 -11
- package/logo.png +0 -0
- package/performance.html +0 -31
- package/src/components/api-request.js +0 -1787
- package/src/components/api-response.js +0 -335
- package/src/components/dialog-box.js +0 -73
- package/src/components/json-tree.js +0 -145
- package/src/components/schema-table.js +0 -358
- package/src/components/schema-tree.js +0 -378
- package/src/components/tag-input.js +0 -135
- package/src/index.js +0 -7
- package/src/json-schema-viewer.js +0 -345
- package/src/oauth-receiver.js +0 -56
- package/src/rapidoc-mini.js +0 -380
- package/src/rapidoc.js +0 -1082
- package/src/styles/border-styles.js +0 -24
- package/src/styles/custom-styles.js +0 -10
- package/src/styles/dialog-box-styles.js +0 -75
- package/src/styles/endpoint-styles.js +0 -202
- package/src/styles/flex-styles.js +0 -15
- package/src/styles/font-styles.js +0 -268
- package/src/styles/info-styles.js +0 -21
- package/src/styles/input-styles.js +0 -202
- package/src/styles/nav-styles.js +0 -198
- package/src/styles/prism-styles.js +0 -105
- package/src/styles/schema-styles.js +0 -121
- package/src/styles/tab-styles.js +0 -47
- package/src/styles/table-styles.js +0 -58
- package/src/templates/advance-search-template.js +0 -72
- package/src/templates/callback-template.js +0 -73
- package/src/templates/code-samples-template.js +0 -34
- package/src/templates/components-template.js +0 -76
- package/src/templates/endpoint-template.js +0 -249
- package/src/templates/expanded-endpoint-template.js +0 -197
- package/src/templates/focused-endpoint-template.js +0 -110
- package/src/templates/header-template.js +0 -66
- package/src/templates/json-schema-viewer-template.js +0 -185
- package/src/templates/logo-template.js +0 -18
- package/src/templates/main-body-template.js +0 -121
- package/src/templates/navbar-template.js +0 -272
- package/src/templates/overview-template.js +0 -79
- package/src/templates/security-scheme-template.js +0 -610
- package/src/templates/server-template.js +0 -115
- package/src/utils/color-utils.js +0 -59
- package/src/utils/common-utils.js +0 -168
- package/src/utils/schema-utils.js +0 -1086
- package/src/utils/spec-parser.js +0 -462
- package/src/utils/theme.js +0 -288
- package/webpack.config.js +0 -142
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapidoc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "RapiDoc - Open API spec viewer with built in console",
|
|
5
5
|
"author": "Mrinmoy Majumdar <mrin9@yahoo.com>",
|
|
6
6
|
"homepage": "https://rapidocweb.com",
|
|
@@ -29,55 +29,32 @@
|
|
|
29
29
|
"openapi explorer",
|
|
30
30
|
"swagger themes"
|
|
31
31
|
],
|
|
32
|
+
"type": "module",
|
|
32
33
|
"main": "dist/rapidoc-min.js",
|
|
33
34
|
"module": "dist/rapidoc-min.js",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"base64-arraybuffer": "^1.0.2",
|
|
38
|
-
"buffer": "^6.0.3",
|
|
39
|
-
"lit": "^3.2.0",
|
|
40
|
-
"marked": "4.3.0",
|
|
41
|
-
"prismjs": "^1.29.0",
|
|
42
|
-
"randexp": "^0.5.3",
|
|
43
|
-
"xml-but-prettier": "^1.0.1"
|
|
44
|
-
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
45
38
|
"scripts": {
|
|
46
|
-
"build": "
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"lint-fix": "./node_modules/eslint/bin/eslint.js --fix ./src/**"
|
|
39
|
+
"build": "vite build",
|
|
40
|
+
"build:size": "ANALYZE=true vite build",
|
|
41
|
+
"lint": "eslint './src/**/*.js'",
|
|
42
|
+
"format": "prettier --check './src/**/*.{js,html,css}'",
|
|
43
|
+
"format-fix": "prettier --write './src/**/*.{js,html,css}'",
|
|
44
|
+
"analyze": "lit-analyzer src"
|
|
53
45
|
},
|
|
54
|
-
"
|
|
55
|
-
"@
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"clean-webpack-plugin": "^4.0.0",
|
|
61
|
-
"compression-webpack-plugin": "^11.1.0",
|
|
62
|
-
"css-loader": "^7.1.2",
|
|
63
|
-
"eslint": "^8.57.1",
|
|
64
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
65
|
-
"eslint-import-resolver-webpack": "^0.13.9",
|
|
66
|
-
"eslint-plugin-import": "^2.30.0",
|
|
67
|
-
"eslint-webpack-plugin": "4.2.0",
|
|
68
|
-
"file-loader": "^6.2.0",
|
|
69
|
-
"filemanager-webpack-plugin": "^8.0.0",
|
|
70
|
-
"html-webpack-plugin": "^5.6.0",
|
|
71
|
-
"inspectpack": "^4.7.1",
|
|
72
|
-
"style-loader": "^4.0.0",
|
|
73
|
-
"terser-webpack-plugin": "^5.3.10",
|
|
74
|
-
"unminified-webpack-plugin": "^3.0.0",
|
|
75
|
-
"webpack": "^5.94.0",
|
|
76
|
-
"webpack-bundle-analyzer": "^4.10.2",
|
|
77
|
-
"webpack-cli": "^5.1.4",
|
|
78
|
-
"webpack-dev-server": "4.11.1"
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@scalar/openapi-parser": "^0.29.7",
|
|
48
|
+
"github-slugger": "^2.0.0",
|
|
49
|
+
"lit": "^3.2.1",
|
|
50
|
+
"marked": "15.0.6",
|
|
51
|
+
"microlighter": "^2.2.0"
|
|
79
52
|
},
|
|
80
|
-
"
|
|
81
|
-
"
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@lit-labs/rollup-plugin-minify-html-literals": "^0.2.0",
|
|
55
|
+
"esbuild": "^0.25.0",
|
|
56
|
+
"rollup-plugin-visualizer": "^7.1.1",
|
|
57
|
+
"vite": "^6.2.0",
|
|
58
|
+
"vite-plugin-banner": "^0.8.1"
|
|
82
59
|
}
|
|
83
|
-
}
|
|
60
|
+
}
|
package/.babelrc.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
[
|
|
4
|
-
"@babel/preset-env",
|
|
5
|
-
{
|
|
6
|
-
"targets": {
|
|
7
|
-
"esmodules": true,
|
|
8
|
-
"android": "80",
|
|
9
|
-
"chrome": "85",
|
|
10
|
-
"edge": "87",
|
|
11
|
-
"firefox": "84",
|
|
12
|
-
"ios": "13",
|
|
13
|
-
"node": "14",
|
|
14
|
-
"opera": "72",
|
|
15
|
-
"safari": "14",
|
|
16
|
-
"samsung": "14"
|
|
17
|
-
},
|
|
18
|
-
"bugfixes": true
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
],
|
|
22
|
-
"plugins": [
|
|
23
|
-
[
|
|
24
|
-
"template-html-minifier", {
|
|
25
|
-
"modules": {
|
|
26
|
-
"lit-html": ["html"],
|
|
27
|
-
"lit-element": [
|
|
28
|
-
"html",
|
|
29
|
-
{"name": "css", "encapsulation": "style"}
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"htmlMinifier": {
|
|
33
|
-
"collapseWhitespace": true,
|
|
34
|
-
"conservativeCollapse": true,
|
|
35
|
-
"removeComments": true,
|
|
36
|
-
"caseSensitive": true,
|
|
37
|
-
"minifyCSS": true
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
]
|
|
42
|
-
}
|
package/.eslintrc
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@babel/eslint-parser",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"sourceType": "module",
|
|
5
|
-
"allowImportExportEverywhere": false,
|
|
6
|
-
"ecmaVersion": 2020,
|
|
7
|
-
"babelOptions": {
|
|
8
|
-
"configFile": "./.babelrc.json"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"extends": "airbnb-base",
|
|
12
|
-
"settings": {
|
|
13
|
-
"import/resolver":{
|
|
14
|
-
"webpack":{
|
|
15
|
-
"config":"webpack.config.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"env": {
|
|
20
|
-
"browser": true,
|
|
21
|
-
"node": true
|
|
22
|
-
},
|
|
23
|
-
"globals": {
|
|
24
|
-
"globalThis": false // means it is not writeable
|
|
25
|
-
},
|
|
26
|
-
"rules": {
|
|
27
|
-
"max-len": [1, 300, 2, {"ignoreComments": true}],
|
|
28
|
-
"no-debugger": 0,
|
|
29
|
-
"no-plusplus": 0,
|
|
30
|
-
"no-param-reassign": 0,
|
|
31
|
-
"no-nested-ternary": 0,
|
|
32
|
-
"no-continue": 0,
|
|
33
|
-
"no-restricted-syntax" :0,
|
|
34
|
-
"guard-for-in": 0,
|
|
35
|
-
"consistent-return": 0,
|
|
36
|
-
"array-callback-return": 0,
|
|
37
|
-
"class-methods-use-this": 0,
|
|
38
|
-
"prefer-destructuring": [
|
|
39
|
-
"error", {"object": true, "array": false}
|
|
40
|
-
],
|
|
41
|
-
"no-unused-vars": ["error", {
|
|
42
|
-
"vars": "all",
|
|
43
|
-
"args": "after-used",
|
|
44
|
-
"caughtErrors": "all",
|
|
45
|
-
"ignoreRestSiblings": false
|
|
46
|
-
}],
|
|
47
|
-
"object-curly-newline": ["error", {
|
|
48
|
-
"ObjectPattern": { "multiline": true },
|
|
49
|
-
"ImportDeclaration": "never",
|
|
50
|
-
"ExportDeclaration": { "multiline": true, "minProperties": 6 }
|
|
51
|
-
}]
|
|
52
|
-
}
|
|
53
|
-
}
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: rapidoc
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
-
custom: ['paypal.me/mrin'] # Replace with up to 4 custom sponsorship URLs e.g.,
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: works
|
|
2
|
-
on:
|
|
3
|
-
- pull_request
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
words:
|
|
7
|
-
name: Check Language
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- name: Checkout
|
|
11
|
-
uses: actions/checkout@v2
|
|
12
|
-
|
|
13
|
-
- name: Inclusive Language
|
|
14
|
-
uses: get-woke/woke-action@v0
|
|
15
|
-
with:
|
|
16
|
-
# Cause the check to fail on any broke rules
|
|
17
|
-
fail-on-error: true
|
|
18
|
-
|
|
19
|
-
- name: Profanity Check
|
|
20
|
-
uses: radiantly/profanity-filter-action@v1.1
|
|
21
|
-
with:
|
|
22
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
## Pull Request Guidelines
|
|
2
|
-
|
|
3
|
-
- Fork this repository to your own account. Do not create branches here.
|
|
4
|
-
- **DO NOT** include files inside `dist` directory.
|
|
5
|
-
- Rebase before creating a PR to keep commit history clear.
|
|
6
|
-
- Make sure that running `yarn build` output do not emit any warnings or errors
|
|
7
|
-
|
|
8
|
-
### When adding/modifying/renaming any attribute method or event
|
|
9
|
-
**MUST HAVE**
|
|
10
|
-
- Must be supported with an issue and provide little description about it, including the name, allowed values, defaults etc
|
|
11
|
-
- Add relevant documentation in `./docs/api.html`
|
|
12
|
-
|
|
13
|
-
**NICE TO HAVE**
|
|
14
|
-
- If adding new dependency, be considerate of the bundle size since we bundle everything in a single file (`rapidoc-min.js`), like to keep its size down
|
|
15
|
-
- It is a good idea to show case it using an example
|
|
16
|
-
- examples go under `./docs/examples` folder
|
|
17
|
-
- if your example is using a new spec then add in `./docs/specs` folder
|
|
18
|
-
- include a reference to the example in `./docs/list.html` file
|
|
19
|
-
|
|
20
|
-
## Prerequisites
|
|
21
|
-
`Node 10.15.3+` and `yarn 1.22.4+` and `npm 6.14.4+` are required. Note: we use yarn to lock dependency versions, so you should install dependencies using `yarn` instead of `npm`.
|
|
22
|
-
|
|
23
|
-
For development
|
|
24
|
-
```shell
|
|
25
|
-
git clone https://github.com/rapi-doc/RapiDoc.git
|
|
26
|
-
yarn install
|
|
27
|
-
yarn serve
|
|
28
|
-
# open http://localhost:8080
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
To Generate Production bundle:
|
|
32
|
-
```shell
|
|
33
|
-
yarn build
|
|
34
|
-
# yarn build_windows (if you use windows)
|
|
35
|
-
```
|
package/dist/index.html
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,user-scalable=yes"><title>RapiDoc</title><link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css"><script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script><script defer="defer" src="rapidoc-min.js"></script></head><script>window.addEventListener('DOMContentLoaded', (event) => {
|
|
2
|
-
const docEl = document.getElementById('thedoc');
|
|
3
|
-
docEl.addEventListener('before-try', (e) => {
|
|
4
|
-
e.detail.request.headers.append('AAA-BBB', 'CCC DDDD');
|
|
5
|
-
});
|
|
6
|
-
});</script><body><rapi-doc spec-url="./specs/petstore_mini.yaml" id="thedoc" theme="dark" render-style="focused" schema-style="tree" show-method-in-nav-bar="true" use-path-in-nav-bar="true" show-components="true" show-info="true" show-header="true" allow-search="true" allow-advanced-search="true" allow-spec-url-load="false" allow-spec-file-download="true" allow-server-selection="true" allow-authentication="true" update-route="false" remove-endpoints-with-badge-label-as="one" match-type="regex" persist-auth="true" scroll-behavior="smooth"></rapi-doc></body></html>
|
package/dist/index.html.gz
DELETED
|
Binary file
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
/*!
|
|
9
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
10
|
-
* (c) 2017-2021 Joachim Wester
|
|
11
|
-
* MIT license
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
16
|
-
* (c) 2017-2022 Joachim Wester
|
|
17
|
-
* MIT licensed
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/*!
|
|
21
|
-
* repeat-string <https://github.com/jonschlinkert/repeat-string>
|
|
22
|
-
*
|
|
23
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
24
|
-
* Licensed under the MIT License.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
28
|
-
|
|
29
|
-
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @license
|
|
33
|
-
* Copyright 2017 Google LLC
|
|
34
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @license
|
|
39
|
-
* Copyright 2018 Google LLC
|
|
40
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @license
|
|
45
|
-
* Copyright 2019 Google LLC
|
|
46
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
51
|
-
*
|
|
52
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
53
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
54
|
-
* @namespace
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @preserve
|
|
60
|
-
* RapiDoc 9.3.7 - WebComponent to View OpenAPI docs
|
|
61
|
-
* License: MIT
|
|
62
|
-
* Repo : https://github.com/rapi-doc/RapiDoc
|
|
63
|
-
* Author : Mrinmoy Majumdar
|
|
64
|
-
*/
|
|
Binary file
|
package/dist/rapidoc-min.js.gz
DELETED
|
Binary file
|