Skip to content

Commit 67d0def

Browse files
committed
Fixed regression issues due to cercular-ref fixes
1 parent be9ba31 commit 67d0def

15 files changed

+261
-311
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ Custom Eelement for Open-API spec viewing
4545
[Check out the usage and examples](https://mrin9.github.io/RapiDoc/)
4646

4747

48+
## Build Process
49+
We recommend `yarn` over `npm` as we use yarn [resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) to keep the bundle size smaller. As of this writing this feature is not supported in npm natively
50+
```bash
51+
# Clone / Download the project then
52+
yarn install
53+
54+
# build will generate rapidoc-min.js, this is the only file you will need.
55+
# use it in the script tag of your html <script type="text/javascript" src="rapidoc-min.js"></script></body>
56+
yarn build
57+
58+
# for developement use yarn serve (this will start an webserver at port 8080, then navigate to localhost:8080)
59+
yarn serve
60+
```
61+
62+
4863
## Help RapiDoc grow
4964
If you like this project, and would like to help us raise awareness of RapiDoc,
5065
I am looking for adding links to your design of RapiDoc.

dist/index.html

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,67 +9,16 @@
99

1010
<body>
1111
<!--
12+
Some sample spec to try
13+
https://api.apis.guru/v2/specs/stripe.com/2019-02-19/swagger.json
1214
https://api.apis.guru/v2/specs/github.com/v3/swagger.json
1315
https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
1416
https://petstore.swagger.io/v2/swagger.json
1517
https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
18+
-->
1619

17-
<button onclick="changeAttr('heading-text')"> Change Heading Text </button>
18-
<button onclick="changeLayout()"> Change Layout </button>
19-
<button onclick="toggleAttr('show-header')"> Toggle Header </button>
20-
<button onclick="toggleAttr('body-padding')"> Toggle Padding </button>
21-
<button onclick="toggleTheme()"> Toggle Theme </button>
22-
23-
<script>
24-
25-
function getRapiDoc(){
26-
return document.getElementById("thedoc");
27-
}
28-
function changeAttr(attr){
29-
getRapiDoc().setAttribute(attr, attr+Math.floor(Math.random() * 100) );
30-
}
31-
32-
function changeLayout(){
33-
let currLayout = getRapiDoc().getAttribute('layout');
34-
let newLayout = currLayout==="row"?"column":"row";
35-
getRapiDoc().setAttribute('layout', newLayout );
36-
}
37-
function toggleAttr(attr){
38-
if (getRapiDoc().getAttribute(attr) === 'false'){
39-
getRapiDoc().setAttribute(attr,"true");
40-
}
41-
else{
42-
getRapiDoc().setAttribute(attr,"false");
43-
}
44-
}
45-
46-
function toggleTheme(){
47-
if (getRapiDoc().getAttribute('theme') === 'dark'){
48-
getRapiDoc().setAttribute('theme',"light");
49-
}
50-
else{
51-
getRapiDoc().setAttribute('theme',"dark");
52-
}
53-
}
54-
55-
56-
</script>
57-
-->
58-
<!--
59-
<rapi-doc id = "thedoc" spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json"
60-
heading-text="My Product"
61-
spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json"
62-
primary-color="#ffff99"
63-
header-color="#AA0000"
64-
theme="dark"
65-
layout="row"
66-
show-header='false'
67-
style="width:200px; border:1px solid #333; border-radius:4px;"
68-
>
69-
</rapi-doc>
70-
-->
7120
<rapi-doc
72-
spec-url="https://petstore.swagger.io/v2/swagger.json"
21+
spec-url="https://petstore.swagger.io/v2/swagger.json"
7322
layout="row"
7423
theme="dark"
7524
>

dist/index.html.gz

-450 Bytes
Binary file not shown.

dist/rapidoc-min.js

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

dist/rapidoc-min.js.gz

-140 Bytes
Binary file not shown.

dist/rapidoc-min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.map.gz

26 Bytes
Binary file not shown.

dist/report.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/rapidoc-min.js

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

index.html

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,67 +9,16 @@
99

1010
<body>
1111
<!--
12+
Some sample spec to try
13+
https://api.apis.guru/v2/specs/stripe.com/2019-02-19/swagger.json
1214
https://api.apis.guru/v2/specs/github.com/v3/swagger.json
1315
https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json
1416
https://petstore.swagger.io/v2/swagger.json
1517
https://assets.zuora.com/zuora-documentation/swagger.yaml <<< Large spec with lot of markdown
18+
-->
1619

17-
<button onclick="changeAttr('heading-text')"> Change Heading Text </button>
18-
<button onclick="changeLayout()"> Change Layout </button>
19-
<button onclick="toggleAttr('show-header')"> Toggle Header </button>
20-
<button onclick="toggleAttr('body-padding')"> Toggle Padding </button>
21-
<button onclick="toggleTheme()"> Toggle Theme </button>
22-
23-
<script>
24-
25-
function getRapiDoc(){
26-
return document.getElementById("thedoc");
27-
}
28-
function changeAttr(attr){
29-
getRapiDoc().setAttribute(attr, attr+Math.floor(Math.random() * 100) );
30-
}
31-
32-
function changeLayout(){
33-
let currLayout = getRapiDoc().getAttribute('layout');
34-
let newLayout = currLayout==="row"?"column":"row";
35-
getRapiDoc().setAttribute('layout', newLayout );
36-
}
37-
function toggleAttr(attr){
38-
if (getRapiDoc().getAttribute(attr) === 'false'){
39-
getRapiDoc().setAttribute(attr,"true");
40-
}
41-
else{
42-
getRapiDoc().setAttribute(attr,"false");
43-
}
44-
}
45-
46-
function toggleTheme(){
47-
if (getRapiDoc().getAttribute('theme') === 'dark'){
48-
getRapiDoc().setAttribute('theme',"light");
49-
}
50-
else{
51-
getRapiDoc().setAttribute('theme',"dark");
52-
}
53-
}
54-
55-
56-
</script>
57-
-->
58-
<!--
59-
<rapi-doc id = "thedoc" spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json"
60-
heading-text="My Product"
61-
spec-url="https://api.apis.guru/v2/specs/bitbucket.org/2.0/swagger.json"
62-
primary-color="#ffff99"
63-
header-color="#AA0000"
64-
theme="dark"
65-
layout="row"
66-
show-header='false'
67-
style="width:200px; border:1px solid #333; border-radius:4px;"
68-
>
69-
</rapi-doc>
70-
-->
7120
<rapi-doc
72-
spec-url="https://petstore.swagger.io/v2/swagger.json"
21+
spec-url="https://petstore.swagger.io/v2/swagger.json"
7322
layout="row"
7423
theme="dark"
7524
>

0 commit comments

Comments
 (0)