Skip to content

Commit 3937ae2

Browse files
committed
Update examples
1 parent 965d82c commit 3937ae2

File tree

219 files changed

+16080
-7073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+16080
-7073
lines changed

packages/openapi-typescript/examples/digital-ocean-api/DigitalOcean-public.v2.yaml

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

packages/openapi-typescript/examples/digital-ocean-api/resources/1-clicks/examples/curl/oneClicks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ lang: cURL
22
source: |-
33
curl -X GET \
44
-H "Content-Type: application/json" \
5-
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
65
"https://api.digitalocean.com/v2/1-clicks"

packages/openapi-typescript/examples/digital-ocean-api/resources/1-clicks/examples/python/oneClicks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ source: |-
33
import os
44
from pydo import Client
55
6-
client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))
6+
client = Client(token="")
77
88
one_click_apps = client.one_clicks.list()

packages/openapi-typescript/examples/digital-ocean-api/resources/1-clicks/oneClicks_install_kubernetes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ x-codeSamples:
4040

4141
security:
4242
- bearer_auth:
43-
- '1click:create'
43+
- 'kubernetes:update'

packages/openapi-typescript/examples/digital-ocean-api/resources/1-clicks/oneClicks_list.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,4 @@ x-codeSamples:
3737
- $ref: 'examples/python/oneClicks.yml'
3838

3939
security:
40-
- bearer_auth:
41-
- '1click:read'
42-
40+
- bearer_auth: []

packages/openapi-typescript/examples/digital-ocean-api/resources/apps/apps_create_deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ x-codeSamples:
4343

4444
security:
4545
- bearer_auth:
46-
- 'app:create'
46+
- 'app:update'

packages/openapi-typescript/examples/digital-ocean-api/resources/apps/apps_get_exec.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ summary: Retrieve Exec URL for Deployment
44

55
description:
66
Returns a websocket URL that allows sending/receiving console input and output
7-
to a component of the specified deployment if one exists.
7+
to a component of the specified deployment if one exists. Optionally, the instance_name parameter can be provided to retrieve the exec URL for a specific instance. Note that instances are ephemeral; therefore, we recommended to avoid making persistent changes or such scripting around them.
88

99
tags:
1010
- Apps
@@ -13,6 +13,7 @@ parameters:
1313
- $ref: parameters.yml#/app_id
1414
- $ref: parameters.yml#/deployment_id
1515
- $ref: parameters.yml#/component
16+
- $ref: parameters.yml#/instance_name
1617

1718
responses:
1819
"200":
@@ -39,4 +40,4 @@ x-codeSamples:
3940

4041
security:
4142
- bearer_auth:
42-
- "app:update"
43+
- "app:access_console"

packages/openapi-typescript/examples/digital-ocean-api/resources/apps/apps_get_exec_active_deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ x-codeSamples:
3838

3939
security:
4040
- bearer_auth:
41-
- "app:update"
41+
- "app:access_console"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
operationId: apps_get_health
2+
3+
summary: Retrieve App Health
4+
5+
description: Retrieve information like health status, cpu and memory utilization of app components.
6+
7+
parameters:
8+
- $ref: parameters.yml#/app_id
9+
10+
tags:
11+
- Apps
12+
13+
responses:
14+
"200":
15+
$ref: responses/apps_health.yml
16+
17+
"401":
18+
$ref: ../../shared/responses/unauthorized.yml
19+
20+
"404":
21+
$ref: "../../shared/responses/not_found.yml"
22+
23+
"429":
24+
$ref: "../../shared/responses/too_many_requests.yml"
25+
26+
"500":
27+
$ref: ../../shared/responses/server_error.yml
28+
29+
default:
30+
$ref: ../../shared/responses/unexpected_error.yml
31+
32+
x-codeSamples:
33+
- $ref: 'examples/curl/apps_get_health.yml'
34+
35+
security:
36+
- bearer_auth:
37+
- 'app:read'
38+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/apps/{id}/health"

0 commit comments

Comments
 (0)