Skip to content

Commit 9255bfc

Browse files
committed
updated packages and generated build
1 parent bd6fda7 commit 9255bfc

File tree

6 files changed

+50
-14
lines changed

6 files changed

+50
-14
lines changed

dist/rapidoc-min.js

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

dist/rapidoc-min.js.gz

-12 Bytes
Binary file not shown.

dist/report.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/examples/auth.html

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@
3030
<rapi-doc id="thedoc"
3131
spec-url="../specs/auth.yaml"
3232
show-info = "true"
33+
theme = "dark"
3334
render-style="read"
3435
show-header="false"
3536
>
3637
<div slot='operations-top'>
3738
<div style="font-size:14px; border:0; background-color: #282828; border-radius:4px; padding:16px; margin:16px 75px">
38-
<h3> Prgramatically Applying Security</h3>
39-
<div style="color:#888"> This section is not a part of RapiDoc generated doc. It is created using HTML/JS to demonstrate how to programatically apply security keys</div>
39+
<h3>Programmatically Applying Security and Setting a API Server</h3>
40+
<div style="color:#777">
41+
*This section is not RapiDoc generated. It is user injected HTML/JS into a <span style="font-family:'Roboto Mono'"> &lt;slot&gt;</span> element to demonstrate how to programatically apply security keys
42+
</div>
4043

4144
<div style="margin-top:16px">
4245
RapiDoc provides you with two helper methods which you can use to supply security keys programatically.
@@ -55,7 +58,7 @@ <h3> Prgramatically Applying Security</h3>
5558
<tr> <td>apiKey</td><td>api_key1</td></tr>
5659
<tr> <td>apiKey</td><td>api_key2</td></tr>
5760
<tr> <td>apiKey</td><td>api_key_cookie</td><td>
58-
<span style="font-family:'Open Sans'; color:#666">
61+
<span style="font-family:'Open Sans'; color:#777">
5962
If the apiKey needs to send using a cookie, then it wont be set as RapiDoc do not support creation or reading of cookies
6063
</span>
6164
</td></tr>
@@ -94,10 +97,38 @@ <h3> Prgramatically Applying Security</h3>
9497
<td colspan="2"><button class='size btn' style="width:200px" onclick='clearSecurityKeys(event)'>Clear all Keys</button></td>
9598
</tr>
9699
</table>
100+
<div style="margin:32px 0 16px 0; color:#777; font-weight:bold">
101+
Below form is used for programmatically setting the API server
102+
</div>
103+
<table>
104+
<tr>
105+
<td> API Server Url</td>
106+
<td>
107+
<input class='size txt' id='server-url' value="https://reqres.in/api/" type='text' placeholder='A Valid server url thats defined in this spec' spellcheck='false' style="width:290px">
108+
</td>
109+
<td colspan="2"><button class='size btn' style="width:110px" onclick='setApiServer(event)'>Set API Server</button></td>
110+
</tr>
111+
</table>
112+
113+
97114
</div>
98115
</div>
99116
</rapi-doc>
100117
<script>
118+
function setApiServer(ev) {
119+
const docEl = document.getElementById('thedoc');
120+
const trEl = ev.target.closest('tr');
121+
const serverUrl = trEl.querySelector('#server-url').value;
122+
result = docEl.setApiServer(serverUrl);
123+
ev.target.innerText = result ? 'Applied !' : 'Failed';
124+
ev.target.style.backgroundColor = result ? 'green' : 'orangered';
125+
window.setTimeout(function(){
126+
ev.target.innerText = 'Apply';
127+
ev.target.style.backgroundColor = '#2069e0';
128+
}, 5000)
129+
130+
}
131+
101132
function clearSecurityKeys(ev) {
102133
const docEl = document.getElementById('thedoc');
103134
docEl.removeAllSecurityKeys();

docs/examples/try.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,25 @@
1414
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600&display=swap" rel="stylesheet">
1515
<link href='../index.css' rel='stylesheet'>
1616
<script type='text/javascript' src='../rapidoc-min.js'></script>
17+
<style>
18+
rapi-doc::part(section-navbar) {
19+
background: linear-gradient(90deg,#3d4e70, #2e3746);
20+
}
21+
</style>
1722
</head>
1823
<body>
19-
<rapi-doc spec-url="../specs/data-types-simple.yaml"
24+
<rapi-doc spec-url="../specs/mock.yaml"
2025
id = "thedoc"
21-
nav-bg-color = '#3f4d67'
22-
nav-text-color = '#a9b7d0'
26+
theme="dark"
27+
primary-color="#f54c47"
28+
bg-color="#2e3746"
29+
text-color = "#bacdee"
2330
allow-authentication = "false"
2431
allow-server-selection = "false"
2532
allow-search = "false"
2633
show-info = "false"
2734
show-header = "false"
2835
render-style = "read"
29-
regular-font = 'Open Sans'
30-
schema-style='table'
3136
>
3237
<div slot="nav-logo">
3338
<div style="text-align: center; padding: 0 0 12px 0; color:#47AFE8"> Enable/Disable TRY </div>

docs/rapidoc-min.js

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

0 commit comments

Comments
 (0)