Skip to content

Commit 24f91ab

Browse files
committed
autogen(docs): generate and format documentation
1 parent 540c89d commit 24f91ab

File tree

2 files changed

+297
-6
lines changed

2 files changed

+297
-6
lines changed

docs/docs/reference/api.mdx

Lines changed: 292 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,6 +2737,239 @@ p JSON.parse(result)
27372737
</TabItem>
27382738
</Tabs>
27392739

2740+
<a id="opIdpatchOAuth2Client"></a>
2741+
2742+
### Patch an OAuth 2.0 Client
2743+
2744+
```
2745+
PATCH /clients/{id} HTTP/1.1
2746+
Content-Type: application/json
2747+
Accept: application/json
2748+
2749+
```
2750+
2751+
Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will
2752+
be updated and returned via the API. This is the only time you will be able to
2753+
retrieve the client secret, so write it down and keep it safe.
2754+
2755+
OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows.
2756+
Usually, OAuth 2.0 clients are generated for applications which want to consume
2757+
your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will
2758+
need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected
2759+
and only callable by first-party components.
2760+
2761+
#### Request body
2762+
2763+
```json
2764+
[
2765+
{
2766+
"from": "string",
2767+
"op": "\"replace\"",
2768+
"path": "\"/name\"",
2769+
"value": {}
2770+
}
2771+
]
2772+
```
2773+
2774+
<a id="patch-an-oauth-2.0-client-parameters"></a>
2775+
2776+
#### Parameters
2777+
2778+
| Parameter | In | Type | Required | Description |
2779+
| --------- | ---- | ----------------------------------- | -------- | ----------- |
2780+
| id | path | string | true | none |
2781+
| body | body | [patchRequest](#schemapatchrequest) | true | none |
2782+
2783+
#### Responses
2784+
2785+
<a id="patch-an-oauth-2.0-client-responses"></a>
2786+
2787+
##### Overview
2788+
2789+
| Status | Meaning | Description | Schema |
2790+
| ------ | -------------------------------------------------------------------------- | ------------ | ----------------------------------- |
2791+
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | oAuth2Client | [oAuth2Client](#schemaoauth2client) |
2792+
| 500 | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | genericError | [genericError](#schemagenericerror) |
2793+
2794+
##### Examples
2795+
2796+
###### 200 response
2797+
2798+
```json
2799+
{
2800+
"allowed_cors_origins": ["string"],
2801+
"audience": ["string"],
2802+
"backchannel_logout_session_required": true,
2803+
"backchannel_logout_uri": "string",
2804+
"client_id": "string",
2805+
"client_name": "string",
2806+
"client_secret": "string",
2807+
"client_secret_expires_at": 0,
2808+
"client_uri": "string",
2809+
"contacts": ["string"],
2810+
"created_at": "2019-08-24T14:15:22Z",
2811+
"frontchannel_logout_session_required": true,
2812+
"frontchannel_logout_uri": "string",
2813+
"grant_types": ["string"],
2814+
"jwks": {},
2815+
"jwks_uri": "string",
2816+
"logo_uri": "string",
2817+
"metadata": {},
2818+
"owner": "string",
2819+
"policy_uri": "string",
2820+
"post_logout_redirect_uris": ["string"],
2821+
"redirect_uris": ["string"],
2822+
"request_object_signing_alg": "string",
2823+
"request_uris": ["string"],
2824+
"response_types": ["string"],
2825+
"scope": "string",
2826+
"sector_identifier_uri": "string",
2827+
"subject_type": "string",
2828+
"token_endpoint_auth_method": "string",
2829+
"token_endpoint_auth_signing_alg": "string",
2830+
"tos_uri": "string",
2831+
"updated_at": "2019-08-24T14:15:22Z",
2832+
"userinfo_signed_response_alg": "string"
2833+
}
2834+
```
2835+
2836+
<aside class="success">This operation does not require authentication</aside>
2837+
2838+
#### Code samples
2839+
2840+
<Tabs groupId="code-samples" defaultValue="shell"
2841+
values={[{label: 'Shell', value: 'shell'}, {label: 'Go', value: 'go'}, {label: 'Node', value: 'node'},
2842+
{label: 'Java', value: 'java'}, {label: 'Python', value: 'python'}, {label: 'Ruby', value: 'ruby'}]}>
2843+
<TabItem value="shell">
2844+
2845+
```shell
2846+
curl -X PATCH /clients/{id} \
2847+
-H 'Content-Type: application/json' \ -H 'Accept: application/json'
2848+
```
2849+
2850+
</TabItem>
2851+
<TabItem value="go">
2852+
2853+
```go
2854+
package main
2855+
2856+
import (
2857+
"bytes"
2858+
"net/http"
2859+
)
2860+
2861+
func main() {
2862+
headers := map[string][]string{
2863+
"Content-Type": []string{"application/json"},
2864+
"Accept": []string{"application/json"},
2865+
}
2866+
2867+
var body []byte
2868+
// body = ...
2869+
2870+
req, err := http.NewRequest("PATCH", "/clients/{id}", bytes.NewBuffer(body))
2871+
req.Header = headers
2872+
2873+
client := &http.Client{}
2874+
resp, err := client.Do(req)
2875+
// ...
2876+
}
2877+
```
2878+
2879+
</TabItem>
2880+
<TabItem value="node">
2881+
2882+
```javascript
2883+
const fetch = require('node-fetch');
2884+
const input = '[
2885+
{
2886+
"from": "string",
2887+
"op": "\"replace\"",
2888+
"path": "\"/name\"",
2889+
"value": {}
2890+
}
2891+
]';
2892+
const headers = {
2893+
'Content-Type': 'application/json', 'Accept': 'application/json'
2894+
}
2895+
2896+
fetch('/clients/{id}', {
2897+
method: 'PATCH',
2898+
body: input,
2899+
headers
2900+
})
2901+
.then(r => r.json())
2902+
.then((body) => {
2903+
console.log(body)
2904+
})
2905+
```
2906+
2907+
</TabItem>
2908+
<TabItem value="java">
2909+
2910+
```java
2911+
// This sample needs improvement.
2912+
URL obj = new URL("/clients/{id}");
2913+
2914+
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
2915+
con.setRequestMethod("PATCH");
2916+
2917+
int responseCode = con.getResponseCode();
2918+
2919+
BufferedReader in = new BufferedReader(
2920+
new InputStreamReader(con.getInputStream())
2921+
);
2922+
2923+
String inputLine;
2924+
StringBuffer response = new StringBuffer();
2925+
while ((inputLine = in.readLine()) != null) {
2926+
response.append(inputLine);
2927+
}
2928+
in.close();
2929+
2930+
System.out.println(response.toString());
2931+
```
2932+
2933+
</TabItem>
2934+
<TabItem value="python">
2935+
2936+
```python
2937+
import requests
2938+
2939+
headers = {
2940+
'Content-Type': 'application/json',
2941+
'Accept': 'application/json'
2942+
}
2943+
2944+
r = requests.patch(
2945+
'/clients/{id}',
2946+
params={},
2947+
headers = headers)
2948+
2949+
print r.json()
2950+
```
2951+
2952+
</TabItem>
2953+
<TabItem value="ruby">
2954+
2955+
```ruby
2956+
require 'rest-client'
2957+
require 'json'
2958+
2959+
headers = {
2960+
'Content-Type' => 'application/json',
2961+
'Accept' => 'application/json'
2962+
}
2963+
2964+
result = RestClient.patch '/clients/{id}',
2965+
params: {}, headers: headers
2966+
2967+
p JSON.parse(result)
2968+
```
2969+
2970+
</TabItem>
2971+
</Tabs>
2972+
27402973
<a id="opIdisInstanceAlive"></a>
27412974

27422975
### Check Alive Status
@@ -8005,6 +8238,7 @@ _NullTime implements sql.NullTime functionality._
80058238
}
80068239
],
80078240
"Interface": {
8241+
"ProtocolScheme": "string",
80088242
"Socket": "string",
80098243
"Types": [
80108244
{
@@ -8112,6 +8346,7 @@ _PluginConfigArgs plugin config args_
81128346

81138347
```json
81148348
{
8349+
"ProtocolScheme": "string",
81158350
"Socket": "string",
81168351
"Types": [
81178352
{
@@ -8127,10 +8362,11 @@ _PluginConfigInterface The interface between Docker and the plugin_
81278362

81288363
#### Properties
81298364

8130-
| Name | Type | Required | Restrictions | Description |
8131-
| ------ | --------------------------------------------------- | -------- | ------------ | ----------- |
8132-
| Socket | string | true | none | socket |
8133-
| Types | [[PluginInterfaceType](#schemaplugininterfacetype)] | true | none | types |
8365+
| Name | Type | Required | Restrictions | Description |
8366+
| -------------- | --------------------------------------------------- | -------- | ------------ | ----------------------------------------------------- |
8367+
| ProtocolScheme | string | false | none | Protocol to use for clients connecting to the plugin. |
8368+
| Socket | string | true | none | socket |
8369+
| Types | [[PluginInterfaceType](#schemaplugininterfacetype)] | true | none | types |
81348370

81358371
<a id="tocSpluginconfiglinux"></a>
81368372

@@ -8528,7 +8764,7 @@ _Volume volume_
85288764
| Name | string | true | none | Name of the volume. |
85298765
| Options | object | true | none | The driver specific options used when creating the volume. |
85308766
| » **additionalProperties** | string | false | none | none |
8531-
| Scope | string | true | none | The level at which the volume exists. Either `global` for cluster-wide,<br/>or `local` for machine level. |
8767+
| Scope | string | true | none | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. |
85328768
| Status | object | false | none | Low-level details about the volume, provided by the volume driver.<br/>Details are returned as a map with key/value pairs:<br/>`{"key":"value","key2":"value2"}`.<br/><br/>The `Status` field is optional, and is omitted if the volume driver<br/>does not support this feature. |
85338769
| UsageData | [VolumeUsageData](#schemavolumeusagedata) | false | none | VolumeUsageData Usage details about the volume. This information is used by the<br/>`GET /system/df` endpoint, and omitted in other endpoints. |
85348770

@@ -9140,6 +9376,57 @@ _Contains optional information about the OpenID Connect request._
91409376
| login_hint | string | false | none | LoginHint hints about the login identifier the End-User might use to log in (if necessary).<br/>This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier)<br/>and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a<br/>phone number in the format specified for the phone_number Claim. The use of this parameter is optional. |
91419377
| ui_locales | [string] | false | none | UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a<br/>space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value<br/>"fr-CA fr en" represents a preference for French as spoken in Canada, then French (without a region designation),<br/>followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested<br/>locales are not supported by the OpenID Provider. |
91429378

9379+
<a id="tocSpatchdocument"></a>
9380+
9381+
#### patchDocument
9382+
9383+
<a id="schemapatchdocument"></a>
9384+
9385+
```json
9386+
{
9387+
"from": "string",
9388+
"op": "\"replace\"",
9389+
"path": "\"/name\"",
9390+
"value": {}
9391+
}
9392+
```
9393+
9394+
_A JSONPatch document as defined by RFC 6902_
9395+
9396+
#### Properties
9397+
9398+
| Name | Type | Required | Restrictions | Description |
9399+
| ----- | ------ | -------- | ------------ | ------------------------------------------ |
9400+
| from | string | false | none | A JSON-pointer |
9401+
| op | string | true | none | The operation to be performed |
9402+
| path | string | true | none | A JSON-pointer |
9403+
| value | object | false | none | The value to be used within the operations |
9404+
9405+
<a id="tocSpatchrequest"></a>
9406+
9407+
#### patchRequest
9408+
9409+
<a id="schemapatchrequest"></a>
9410+
9411+
```json
9412+
[
9413+
{
9414+
"from": "string",
9415+
"op": "\"replace\"",
9416+
"path": "\"/name\"",
9417+
"value": {}
9418+
}
9419+
]
9420+
```
9421+
9422+
_A JSONPatch request_
9423+
9424+
#### Properties
9425+
9426+
| Name | Type | Required | Restrictions | Description |
9427+
| ----------- | --------------------------------------- | -------- | ------------ | ------------------- |
9428+
| _anonymous_ | [[patchDocument](#schemapatchdocument)] | false | none | A JSONPatch request |
9429+
91439430
<a id="tocSrejectrequest"></a>
91449431

91459432
#### rejectRequest

spec/api.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2153,6 +2153,10 @@
21532153
"Types"
21542154
],
21552155
"properties": {
2156+
"ProtocolScheme": {
2157+
"description": "Protocol to use for clients connecting to the plugin.",
2158+
"type": "string"
2159+
},
21562160
"Socket": {
21572161
"description": "socket",
21582162
"type": "string"
@@ -2495,7 +2499,7 @@
24952499
}
24962500
},
24972501
"Scope": {
2498-
"description": "The level at which the volume exists. Either `global` for cluster-wide,\nor `local` for machine level.",
2502+
"description": "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level.",
24992503
"type": "string"
25002504
},
25012505
"Status": {

0 commit comments

Comments
 (0)