Skip to content

Commit ae5fb92

Browse files
committed
updated docs and generated build
1 parent 784507b commit ae5fb92

File tree

7 files changed

+35
-31
lines changed

7 files changed

+35
-31
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: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,27 @@ <h3> Prgramatically Applying Security</h3>
3939
<div style="color:#888"> This section is not a part of RapiDoc generated doc. It is created using HTML and JS to dempostrate how to programatically apply security keys</div>
4040

4141
<div style="margin-top:16px">
42-
RapiDoc provides you with helper methods which you may use to set various security keys programatically.
43-
Helpful in the cases where you like to automatically apply security, instead of asking user to key in
44-
<br/><br/>
42+
RapiDoc provides you with helper methods which you may use to set supply security keys programatically.
43+
There are two methods which can be used to set the values needed for various security schemes
44+
<ol>
45+
<li> <span style="font-family:'Roboto Mono'">setHttpUserNameAndPassword()</span></li>
46+
<li> <span style="font-family:'Roboto Mono'">setApiKey()</span></li>
47+
</ol>
4548
</div>
4649
<p>
47-
This spec contains the following security schemes
50+
The table below list all the scurity schemes included in this spec. Check the corrosponding method that can be used to supply a access-token
4851
<table class="table" style="border:1px solid #444; font-family:'Roboto Mono'">
4952
<tr><th>TYPE</th><th>SECURITY SCHEME ID</th><th>METHOD USED TO UPDATE</th></tr>
50-
<tr> <td>http</td><td>http-basic</td> <td>RapiDocEl.setHttpUserNameAndPassword('http-basic', 'newUserName', 'newPassword')</td></tr>
51-
<tr> <td>http</td><td>http-bearer</td><td>RapiDocEl.setHttpUserNameAndPassword('http-bearer', 'newUserName', 'newPassword')</td></tr>
52-
<tr> <td>apiKey</td><td>api_key1</td><td>RapiDocEl.setApiKey('api_key1', 'newApiToken')</td></tr>
53-
<tr> <td>apiKey</td><td>api_key2</td><td>RapiDocEl.setApiKey('api_key2', 'newApiToken')</td></tr>
54-
<tr> <td>apiKey</td><td>api_key_cookie</td><td> Not Supported</td></tr>
55-
<tr> <td>oauth2</td><td>ms-oauth</td><td> ---</td></tr>
53+
<tr> <td>http</td><td>http-basic</td> <td rowspan="2">RapiDocEl.setHttpUserNameAndPassword('http-basic', 'newUserName', 'newPassword')</td></tr>
54+
<tr> <td>http</td><td>http-bearer</td></tr>
55+
<tr> <td>oauth2</td><td>ms-oauth</td><td style="border-bottom: 1px dashed #383838;" rowspan="3">RapiDocEl.setApiKey('api_key1', 'newApiToken')</td></tr>
56+
<tr> <td>apiKey</td><td>api_key1</td></tr>
57+
<tr> <td>apiKey</td><td>api_key2</td></tr>
58+
<tr> <td>apiKey</td><td>api_key_cookie</td><td>
59+
<span style="font-family:'Open Sans'; color:#666">
60+
If the apiKey needs to send using a cookie, then it wont be set as RapiDoc do not support creation or reading of cookies
61+
</span>
62+
</td></tr>
5663
</table>
5764
</p>
5865
<div style="margin:32px 0 16px 0; color:#777; font-weight:bold">
@@ -79,12 +86,8 @@ <h3> Prgramatically Applying Security</h3>
7986
<tr>
8087
<td>OAuth</td>
8188
<td>
82-
<input class='size txt' id='oauth-security-scheme-id' type='text' placeholder='Security Scheme ID' spellcheck='false' style="width:120px">
83-
<input class='size txt' id='oauth-flow' type='text' placeholder='OAuth Flow' spellcheck='false'>
84-
<input class='size txt' id='oauth-client-id' type='text' placeholder='client-id' spellcheck='false' >
85-
<input class='size txt' id='oauth-client-secret' type='text' placeholder='client-secret' spellcheck='false' >
86-
<input class='size txt' id='oauth-username' type='text' placeholder='Username' spellcheck='false' >
87-
<input class='size txt' id='oauth-password' type='text' placeholder='password' spellcheck='false' >
89+
<input class='size txt' id='oauth-security-scheme-id' value="ms-oauth" type='text' placeholder='Security Scheme ID' spellcheck='false' style="width:120px">
90+
<input class='size txt' id='oauth-key-value' type='text' value="new-token" placeholder='Access Token' spellcheck='false' >
8891
<button class='size btn' onclick='setSecurity(event, "oauth2")'>Apply</button>
8992
</td>
9093
</tr>
@@ -116,7 +119,8 @@ <h3> Prgramatically Applying Security</h3>
116119
result = docEl.setApiKey(securitySchemeId, newApiToken);
117120
} else if (securityType === 'oauth2') {
118121
const securitySchemeId = trEl.querySelector('#oauth-security-scheme-id').value;
119-
result = docEl.setOauthClientIdAndSecret(securitySchemeId, 'oauthFlow', 'clientId', 'clientSecret', 'username', 'password', 'scopes');
122+
const newApiToken = trEl.querySelector('#oauth-key-value').value;
123+
result = docEl.setApiKey(securitySchemeId, newApiToken);
120124
}
121125
ev.target.innerText = result ? 'Applied !' : 'Failed';
122126
ev.target.style.backgroundColor = result ? 'green' : 'orangered';

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.

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"webpack": "^5.52.1",
7070
"webpack-bundle-analyzer": "^4.4.2",
7171
"webpack-cli": "^4.8.0",
72-
"webpack-dev-server": "^4.2.0"
72+
"webpack-dev-server": "^4.2.1"
7373
},
7474
"engines": {
7575
"node": ">=10.21.0"

0 commit comments

Comments
 (0)