Skip to content

Commit d79dfdf

Browse files
authored
chore: update all examples (openapi-ts#1640)
* chore: update all examples * Add additional examples to script * Update docs deps
1 parent 9452446 commit d79dfdf

File tree

352 files changed

+225700
-263643
lines changed

Some content is hidden

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

352 files changed

+225700
-263643
lines changed

examples/digital-ocean-api.ts

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

examples/digital-ocean-api/DigitalOcean-public.v2.yaml

Lines changed: 42 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -159,50 +159,8 @@ tags:
159159
which is used in some of the following requests. Each slug denotes the node's identifier,
160160
CPU count, and amount of RAM, in that order.
161161
162-
For **Basic nodes**, reference the following table for its slug:
163-
164-
Slug | CPU | RAM
165-
-------------------|---------|---------
166-
db-s-1vcpu-1gb | 1 vCPU | 1 GB
167-
db-s-1vcpu-2gb | 1 vCPU | 2 GB
168-
db-s-2vcpu-4gb | 2 vCPU | 4 GB
169-
db-s-4vcpu-8gb | 4 vCPU | 8 GB
170-
db-s-6vcpu-16gb | 6 vCPU | 16 GB
171-
db-s-8vcpu-32gb | 8 vCPU | 32 GB
172-
db-s-16vcpu-64gb | 16 vCPU | 64 GB
173-
174-
For **General Purpose nodes**, reference the following table for its slug:
175-
176-
Slug | CPU | RAM
177-
-------------------|---------|---------
178-
gd-2vcpu-8gb | 2 vCPU | 8 GB
179-
gd-4vcpu-16gb | 4 vCPU | 16 GB
180-
gd-8vcpu-32gb | 8 vCPU | 32 GB
181-
gd-16vcpu-64gb | 16 vCPU | 64 GB
182-
gd-32vcpu-128gb | 32 vCPU | 128 GB
183-
gd-40vcpu-160gb | 40 vCPU | 160 GB
184-
185-
For **Storage-Optimized nodes**, reference the following table for its slug:
186-
187-
Slug | CPU | RAM
188-
-------------------|---------|---------
189-
so1_5-2vcpu-16gb | 2 vCPU | 16 GB
190-
so1_5-4vcpu-32gb | 4 vCPU | 32 GB
191-
so1_5-8vcpu-64gb | 8 vCPU | 64 GB
192-
so1_5-16vcpu-128gb | 16 vCPU | 128 GB
193-
so1_5-24vcpu-192gb | 24 vCPU | 192 GB
194-
so1_5-32vcpu-256gb | 32 vCPU | 256 GB
195-
196-
For **Memory-Optimized nodes**, reference the following table for its slug:
197-
198-
Slug | CPU | RAM
199-
-------------------|---------|---------
200-
m-2vcpu-16gb | 2 vCPU | 16 GB
201-
m-4vcpu-32gb | 4 vCPU | 32 GB
202-
m-8vcpu-64gb | 8 vCPU | 64 GB
203-
m-16vcpu-128gb | 16 vCPU | 128 GB
204-
m-24vcpu-192gb | 24 vCPU | 192 GB
205-
m-32vcpu-256gb | 32 vCPU | 256 GB
162+
For a list of currently available database slugs and options, use the `/v2/databases/options` endpoint or use the
163+
`doctl databases options` [command](https://docs.digitalocean.com/reference/doctl/reference/databases/options).
206164
207165
- name: Domain Records
208166
description: |-
@@ -793,6 +751,10 @@ paths:
793751
$ref: 'resources/databases/databases_list_replicas.yml'
794752
post:
795753
$ref: 'resources/databases/databases_create_replica.yml'
754+
755+
/v2/databases/{database_cluster_uuid}/events:
756+
get:
757+
$ref: 'resources/databases/databases_events_logs.yml'
796758

797759
/v2/databases/{database_cluster_uuid}/replicas/{replica_name}:
798760
get:
@@ -815,6 +777,8 @@ paths:
815777
$ref: 'resources/databases/databases_get_user.yml'
816778
delete:
817779
$ref: 'resources/databases/databases_delete_user.yml'
780+
put:
781+
$ref: 'resources/databases/databases_update_user.yml'
818782

819783
/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth:
820784
post:
@@ -876,6 +840,12 @@ paths:
876840
delete:
877841
$ref: 'resources/databases/databases_delete_kafka_topic.yml'
878842

843+
/v2/databases/metrics/credentials:
844+
get:
845+
$ref: 'resources/databases/databases_get_cluster_metrics_credentials.yml'
846+
put:
847+
$ref: 'resources/databases/databases_update_cluster_metrics_credentials.yml'
848+
879849
/v2/domains:
880850
get:
881851
$ref: 'resources/domains/domains_list.yml'
@@ -1577,8 +1547,9 @@ components:
15771547
authenticate.
15781548
15791549
The DigitalOcean API handles this through OAuth, an open standard for
1580-
authorization. OAuth allows you to delegate access to your account in full
1581-
or in read-only mode.
1550+
authorization. OAuth allows you to delegate access to your account.
1551+
Scopes can be used to grant full access, read-only access, or access to
1552+
a specific set of endpoints.
15821553
15831554
You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)
15841555
section of the DigitalOcean control panel for your account.
@@ -1597,6 +1568,31 @@ components:
15971568
- `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)
15981569
- `dor_v1_` for OAuth refresh tokens
15991570
1571+
### Scopes
1572+
1573+
Scopes act like permissions assigned to an API token. These permissions
1574+
determine what actions the token can perform. You can create API
1575+
tokens that grant read-only access, full access, or limited access to
1576+
specific endpoints by using custom scopes.
1577+
1578+
Generally, scopes are designed to match HTTP verbs and common CRUD
1579+
operations (Create, Read, Update, Delete).
1580+
1581+
| HTTP Verb | CRUD Operation | Scope |
1582+
|---|---|---|
1583+
| GET | Read | `<resource>:read` |
1584+
| POST | Create | `<resource>:create` |
1585+
| PUT/PATCH | Update | `<resource>:update` |
1586+
| DELETE | Delete | `<resource>:delete` |
1587+
1588+
For example, creating a new Droplet by making a `POST` request to the
1589+
`/v2/droplets` endpoint requires the `droplet:create` scope while
1590+
listing Droplets by making a `GET` request to the `/v2/droplets`
1591+
endpoint requires the `droplet:read` scope.
1592+
1593+
Each endpoint below specifies which scope is required to access it when
1594+
using custom scopes.
1595+
16001596
### How to Authenticate with OAuth
16011597
16021598
In order to make an authenticated request, include a bearer-type

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-
- 'write'
43+
- '1click:create'

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

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

3939
security:
4040
- bearer_auth:
41-
- 'read'
41+
- '1click:read'
4242

examples/digital-ocean-api/resources/account/account_get.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ x-codeSamples:
3030

3131
security:
3232
- bearer_auth:
33-
- 'read'
33+
- 'account:read'
3434

examples/digital-ocean-api/resources/actions/actions_get.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ x-codeSamples:
3737

3838
security:
3939
- bearer_auth:
40-
- 'read'
40+
- 'actions:read'
4141

examples/digital-ocean-api/resources/actions/actions_list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ x-codeSamples:
3737

3838
security:
3939
- bearer_auth:
40-
- 'read'
40+
- 'actions:read'
4141

examples/digital-ocean-api/resources/apps/apps_assign_alertDestinations.yml

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

4646
security:
4747
- bearer_auth:
48-
- 'write'
48+
- 'app:update'

examples/digital-ocean-api/resources/apps/apps_cancel_deployment.yml

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

3737
security:
3838
- bearer_auth:
39-
- 'write'
39+
- 'app:update'

examples/digital-ocean-api/resources/apps/apps_commit_rollback.yml

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

3737
security:
3838
- bearer_auth:
39-
- 'write'
39+
- 'app:update'

0 commit comments

Comments
 (0)