Skip to content

Commit da8cc44

Browse files
committed
updated documentation
1 parent fed2bbc commit da8cc44

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

docs/api.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ <h2> Supported vendor extensions</h2>
864864
<div class="table-block">
865865
<table class="m-table">
866866
<tr>
867-
<td class="mono bold right" style="width:130px;" >x-code-sample <br/> x-codeSample </td>
867+
<td class="mono bold right" style="width:140px;" >x-code-sample <br/> x-codeSample </td>
868868
<td class="gray"> Use this vendor-extension to provide code samples in various languages
869869
</td>
870870
<td style="width:130px;"><a href="./examples/code-samples.html"> Usage Example </a> </td>
@@ -884,9 +884,10 @@ <h2> Supported vendor extensions</h2>
884884
</tr>
885885

886886
<tr>
887-
<td class="mono bold right">x-client-id <br/> x-client-secret </td>
887+
<td class="mono bold right">x-client-id <br/> x-client-secret <br/> x-default-scopes </td>
888888
<td class="gray">
889-
Use these vendor-extensions to pre fill <span class="mono bold">client-id</span> and <span class="mono bold">client-secret</span> in the UI
889+
Use these vendor-extensions to pre fill <span class="mono bold">client-id</span> and <span class="mono bold">client-secret</span>
890+
and to eventually pre select <span class="mono bold">scopes</span> in the UI
890891
</td>
891892
<td><a href="./examples/oauth-vendor-extension.html"> Usage Example </a> </td>
892893
</tr>

docs/list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ <h2 style="font-weight:700"> OAuth Setup </h2>
375375
<div class = "container">
376376
<a href="./examples/oauth-vendor-extension.html"> OAuth Extensions</a>
377377
<div class = "c-description" >
378-
Pre fill client-id and client-secret with vendor extension 'x-client-id' and 'x-client-secret'
378+
Pre fill client-id and client-secret with vendor extension 'x-client-id' and 'x-client-secret', and pre select
379+
desired scopes with vendor extension 'x-default-scopes'
379380
</div>
380381
</div>
381382
<div class = "container">

docs/specs/oauth-vendor-extension.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ openapi: 3.0.0
22
info:
33
title: Petstore API
44
description: |
5-
Example to show how to use `x-client-id` and `x-client-secret` vendor extensions to pre fill them in the UI.
6-
7-
Below is the Open API spec snippet that shows its usage,
8-
and if you check the authentication section you will find that client-id and client-secret is pre-filled, the user just needs to click on `GET TOKEN`
5+
Example to show how to use `x-client-id`, `x-client-secret` and `x-default-scopes` vendor extensions to pre fill them in the UI.
6+
7+
Below is the Open API spec snippet that shows its usage,
8+
and if you check the authentication section you will find that client-id and client-secret are pre-filled, the user just needs to click on `GET TOKEN`.
9+
Also notice that the scope `dog-lover` is already checked
910
```yaml
1011
openapi: 3.0.0
1112
...
@@ -16,15 +17,14 @@ info:
1617
type: oauth2
1718
x-client-id: my-client-id # <--- when provided it will be pre filled in RapiDoc UI
1819
x-client-secret: my-client-secret # <--- when provided it will be pre filled in RapiDoc UI
19-
x-default-scopes: [dog-lover, another-one] # <--- when provided scopes will be pre checked in RapiDoc UI
20+
x-default-scopes: [dog-lover] # <--- when provided scopes will be pre checked in RapiDoc UI
2021
flows:
2122
authorizationCode:
2223
authorizationUrl: /authorize
2324
tokenUrl: /access_token
2425
scopes:
2526
dog-lover: "always required"
2627
owner: "optional"
27-
another-one: "optional"
2828
```
2929
version: "1.0"
3030
security:
@@ -57,19 +57,16 @@ components:
5757
x-client-secret: my-client-secret
5858
x-default-scopes:
5959
- dog-lover
60-
- another-one
6160
flows:
6261
authorizationCode:
6362
authorizationUrl: /authorize
6463
tokenUrl: /access_token
6564
scopes:
6665
dog-lover: "always required"
6766
owner: "optional"
68-
another-one: "optional"
6967
clientCredentials:
7068
tokenUrl: '/token'
7169
scopes:
7270
dog-lover: "always required"
7371
owner: "optional"
74-
another-one: "optional"
7572

0 commit comments

Comments
 (0)