Skip to content

Commit 345760c

Browse files
committed
Fix parameters with references
1 parent a4100a6 commit 345760c

File tree

82 files changed

+205906
-222460
lines changed

Some content is hidden

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

82 files changed

+205906
-222460
lines changed

examples/digital-ocean-api.ts

+2,289-76
Large diffs are not rendered by default.

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

+50-7
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ tags:
318318
configurations requiring movable addresses.
319319
320320
Floating IPs are bound to a specific region.
321-
321+
322322
- name: Functions
323323
description: |-
324324
[Serverless functions](https://docs.digitalocean.com/products/functions) are blocks of code that run on demand without the need to manage any infrastructure.
325-
You can develop functions on your local machine and then deploy them to a namespace using `doctl`, the [official DigitalOcean CLI tool](https://docs.digitalocean.com/reference/doctl).
325+
You can develop functions on your local machine and then deploy them to a namespace using `doctl`, the [official DigitalOcean CLI tool](https://docs.digitalocean.com/reference/doctl).
326326
327327
The Serverless Functions API currently only supports creating and managing namespaces.
328328
@@ -515,8 +515,8 @@ tags:
515515
516516
- name: Uptime
517517
description: >-
518-
[DigitalOcean Uptime Checks](https://docs.digitalocean.com/products/uptime/) provide the ability to monitor your endpoints from around the world, and alert you when they're slow, unavailable, or SSL certificates are expiring.
519-
518+
[DigitalOcean Uptime Checks](https://docs.digitalocean.com/products/uptime/) provide the ability to monitor your endpoints from around the world, and alert you when they're slow, unavailable, or SSL certificates are expiring.
519+
520520
To interact with Uptime, you will generally send requests to the Uptime endpoint at `/v2/uptime/`.
521521
522522
- name: VPCs
@@ -581,6 +581,10 @@ paths:
581581
put:
582582
$ref: 'resources/apps/apps_update.yml'
583583

584+
/v2/apps/{app_id}/components/{component_name}/logs:
585+
get:
586+
$ref: 'resources/apps/apps_get_logs_active_deployment.yml'
587+
584588
/v2/apps/{app_id}/deployments:
585589
get:
586590
$ref: 'resources/apps/apps_list_deployments.yml'
@@ -595,13 +599,17 @@ paths:
595599
post:
596600
$ref: 'resources/apps/apps_cancel_deployment.yml'
597601

598-
/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs:
602+
/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs:
599603
get:
600604
$ref: 'resources/apps/apps_get_logs.yml'
601605

602606
/v2/apps/{app_id}/deployments/{deployment_id}/logs:
603607
get:
604-
$ref: 'resources/apps/apps_get_logsAggregate.yml'
608+
$ref: 'resources/apps/apps_get_logs_aggregate.yml'
609+
610+
/v2/apps/{app_id}/logs:
611+
get:
612+
$ref: 'resources/apps/apps_get_logs_active_deployment_aggregate.yml'
605613

606614
/v2/apps/tiers:
607615
get:
@@ -651,6 +659,14 @@ paths:
651659
post:
652660
$ref: 'resources/apps/apps_revert_rollback.yml'
653661

662+
/v2/apps/{app_id}/metrics/bandwidth_daily:
663+
get:
664+
$ref: 'resources/apps/apps_get_metrics_bandwidth_usage.yml'
665+
666+
/v2/apps/metrics/bandwidth_daily:
667+
post:
668+
$ref: 'resources/apps/apps_list_metrics_bandwidth_usage.yml'
669+
654670
/v2/cdn/endpoints:
655671
get:
656672
$ref: 'resources/cdn/cdn_list_endpoints.yml'
@@ -784,6 +800,10 @@ paths:
784800
delete:
785801
$ref: 'resources/databases/databases_destroy_replica.yml'
786802

803+
/v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote:
804+
put:
805+
$ref: 'resources/databases/databases_promote_replica.yml'
806+
787807
/v2/databases/{database_cluster_uuid}/users:
788808
get:
789809
$ref: 'resources/databases/databases_list_users.yml'
@@ -821,6 +841,8 @@ paths:
821841
/v2/databases/{database_cluster_uuid}/pools/{pool_name}:
822842
get:
823843
$ref: 'resources/databases/databases_get_connectionPool.yml'
844+
put:
845+
$ref: 'resources/databases/databases_update_connectionPool.yml'
824846
delete:
825847
$ref: 'resources/databases/databases_delete_connectionPool.yml'
826848

@@ -836,6 +858,10 @@ paths:
836858
put:
837859
$ref: 'resources/databases/databases_update_sql_mode.yml'
838860

861+
/v2/databases/{database_cluster_uuid}/upgrade:
862+
put:
863+
$ref: 'resources/databases/databases_upgrade_major_version.yml'
864+
839865
/v2/domains:
840866
get:
841867
$ref: 'resources/domains/domains_list.yml'
@@ -1006,6 +1032,23 @@ paths:
10061032
delete:
10071033
$ref: 'resources/functions/functions_delete_namespace.yml'
10081034

1035+
/v2/functions/namespaces/{namespace_id}/triggers:
1036+
get:
1037+
$ref: 'resources/functions/functions_list_triggers.yml'
1038+
1039+
post:
1040+
$ref: 'resources/functions/functions_create_trigger.yml'
1041+
1042+
/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}:
1043+
get:
1044+
$ref: 'resources/functions/functions_get_trigger.yml'
1045+
1046+
put:
1047+
$ref: 'resources/functions/functions_update_trigger.yml'
1048+
1049+
delete:
1050+
$ref: 'resources/functions/functions_delete_trigger.yml'
1051+
10091052
/v2/images:
10101053
get:
10111054
$ref: 'resources/images/images_list.yml'
@@ -1511,7 +1554,7 @@ components:
15111554
authorization. OAuth allows you to delegate access to your account in full
15121555
or in read-only mode.
15131556
1514-
You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/settings/api/tokens)
1557+
You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)
15151558
section of the DigitalOcean control panel for your account.
15161559
15171560
An OAuth token functions as a complete authentication request. In effect, it

examples/digital-ocean-api/description.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -202,30 +202,30 @@ introduction: |
202202
The rate limiting information is contained within the response headers of
203203
each request. The relevant headers are:
204204
205-
* **RateLimit-Limit**: The number of requests that can be made per hour.
206-
* **RateLimit-Remaining**: The number of requests that remain before you hit your request limit. See the information below for how the request limits expire.
207-
* **RateLimit-Reset**: This represents the time when the oldest request will expire. The value is given in [Unix epoch time](http://en.wikipedia.org/wiki/Unix_time). See below for more information about how request limits expire.
205+
* **ratelimit-limit**: The number of requests that can be made per hour.
206+
* **ratelimit-remaining**: The number of requests that remain before you hit your request limit. See the information below for how the request limits expire.
207+
* **ratelimit-reset**: This represents the time when the oldest request will expire. The value is given in [Unix epoch time](http://en.wikipedia.org/wiki/Unix_time). See below for more information about how request limits expire.
208208
209-
As long as the `RateLimit-Remaining` count is above zero, you will be able
209+
As long as the `ratelimit-remaining` count is above zero, you will be able
210210
to make additional requests.
211211
212212
The way that a request expires and is removed from the current limit count
213213
is important to understand. Rather than counting all of the requests for an
214-
hour and resetting the `RateLimit-Remaining` value at the end of the hour,
214+
hour and resetting the `ratelimit-remaining` value at the end of the hour,
215215
each request instead has its own timer.
216216
217-
This means that each request contributes toward the `RateLimit-Remaining`
217+
This means that each request contributes toward the `ratelimit-remaining`
218218
count for one complete hour after the request is made. When that request's
219219
timer runs out, it is no longer counted towards the request limit.
220220
221-
This has implications on the meaning of the `RateLimit-Reset` header as
221+
This has implications on the meaning of the `ratelimit-reset` header as
222222
well. Because the entire rate limit is not reset at one time, the value of
223223
this header is set to the time when the _oldest_ request will expire.
224224
225-
Keep this in mind if you see your `RateLimit-Reset` value change, but not
225+
Keep this in mind if you see your `ratelimit-reset` value change, but not
226226
move an entire hour into the future.
227227
228-
If the `RateLimit-Remaining` reaches zero, subsequent requests will receive
228+
If the `ratelimit-remaining` reaches zero, subsequent requests will receive
229229
a 429 error code until the request reset has been reached. You can see the
230230
format of the response in the examples.
231231
@@ -234,14 +234,18 @@ introduction: |
234234
235235
* Only 12 `POST` requests to the `/v2/floating_ips` endpoint to create Floating IPs can be made per 60 seconds.
236236
* Only 10 `GET` requests to the `/v2/account/keys` endpoint to list SSH keys can be made per 60 seconds.
237+
* Only 5 requests to any and all `v2/cdn/endpoints` can be made per 10 seconds. This includes `v2/cdn/endpoints`,
238+
`v2/cdn/endpoints/$ENDPOINT_ID`, and `v2/cdn/endpoints/$ENDPOINT_ID/cache`.
239+
* Only 50 strings within the `files` json struct in the `v2/cdn/endpoints/$ENDPOINT_ID/cache` [payload](https://docs.digitalocean.com/reference/api/api-reference/#operation/cdn_purge_cache)
240+
can be requested every 20 seconds.
237241
238242
### Sample Rate Limit Headers
239243
240244
```
241245
. . .
242-
RateLimit-Limit: 1200
243-
RateLimit-Remaining: 1193
244-
RateLimit-Reset: 1402425459
246+
ratelimit-limit: 1200
247+
ratelimit-remaining: 1193
248+
rateLimit-reset: 1402425459
245249
. . .
246250
```
247251

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ operationId: apps_get_logs
22

33
summary: Retrieve Deployment Logs
44

5-
description: Retrieve the logs of a past, in-progress, or active deployment. If a
6-
component name is specified, the logs will be limited to only that component. The
5+
description: Retrieve the logs of a past, in-progress, or active deployment. The
76
response will include links to either real-time logs of an in-progress or active
87
deployment or archived logs of a past deployment.
98

examples/digital-ocean-api/resources/apps/examples/curl/apps_create.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ source: |-
44
-H "Content-Type: application/json" \
55
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
66
"https://api.digitalocean.com/v2/apps"
7+
-d '{"spec":{"name":"web-app","region":"nyc", \
8+
"services":[{"name":"api","github":{"branch":"main",\
9+
"deploy_on_push":true,"repo":"digitalocean/sample-golang"}, \
10+
"run_command":"bin/api","environment_slug":"node-js", \
11+
"instance_count":2,"instance_size_slug":"basic-xxs", \
12+
"routes":[{"path":"/api"}]}]}}'

examples/digital-ocean-api/resources/apps/models/app.yml

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ properties:
5252
title: The ID of the account to which the application belongs
5353
type: string
5454
example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf
55+
pending_deployment:
56+
allOf:
57+
- description: The most recent pending deployment. For CreateApp and UpdateApp transactions this is guaranteed to reflect the associated deployment.
58+
- $ref: apps_deployment.yml
5559
project_id:
5660
readOnly: true
5761
type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type: object
2+
properties:
3+
rules:
4+
description: Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
5+
type: array
6+
items:
7+
$ref: app_ingress_spec_rule.yml
8+
description: Specification for app ingress configurations.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type: object
2+
properties:
3+
match:
4+
$ref: app_ingress_spec_rule_match.yml
5+
6+
cors:
7+
$ref: apps_cors_policy.yml
8+
9+
component:
10+
$ref: app_ingress_spec_rule_routing_component.yml
11+
12+
redirect:
13+
$ref: app_ingress_spec_rule_routing_redirect.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
type: object
2+
properties:
3+
path:
4+
$ref: app_ingress_spec_rule_string_match.yml
5+
description: The match configuration for the rule.
6+
required:
7+
- path
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type: object
2+
properties:
3+
name:
4+
description: The name of the component to route to.
5+
type: string
6+
example: web
7+
8+
preserve_path_prefix:
9+
description: "An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. Note: this is not applicable for Functions Components and is mutually exclusive with `rewrite`."
10+
type: string
11+
example: "true"
12+
13+
rewrite:
14+
description: "An optional field that will rewrite the path of the component to be what is specified here. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If you specified the rewrite to be `/v1/`, requests to `/api/list` would be rewritten to `/v1/list`. Note: this is mutually exclusive with `preserve_path_prefix`."
15+
type: string
16+
example: /api/v1/
17+
description: The component to route to. Only one of `component` or `redirect` may be set.
18+
required:
19+
- name
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
type: object
2+
properties:
3+
uri:
4+
description: "An optional URI path to redirect to. Note: if this is specified the whole URI of the original request will be overwritten to this value, irrespective of the original request URI being matched."
5+
type: string
6+
example: /about
7+
8+
authority:
9+
description: "The authority/host to redirect to. This can be a hostname or IP address. Note: use `port` to set the port."
10+
type: string
11+
example: example.com
12+
13+
port:
14+
description: The port to redirect to.
15+
type: integer
16+
format: int64
17+
example: 443
18+
19+
scheme:
20+
description: "The scheme to redirect to. Supported values are `http` or `https`. Default: `https`."
21+
type: string
22+
example: "https"
23+
24+
redirect_code:
25+
description: The redirect code to use. Defaults to `302`. Supported values are 300, 301, 302, 303, 304, 307, 308.
26+
type: integer
27+
format: int64
28+
example: 302
29+
description: The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
type: object
2+
properties:
3+
prefix:
4+
type: string
5+
description: Prefix-based match. For example, `/api` will match `/api`, `/api/`, and any nested paths such as `/api/v1/endpoint`.
6+
maxLength: 256
7+
example: /api
8+
description: The path to match on.
9+
required:
10+
- prefix

examples/digital-ocean-api/resources/apps/models/app_spec.yml

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ properties:
1818
- ams
1919
- nyc
2020
- fra
21+
- sfo
22+
- sgp
23+
- blr
24+
- tor
25+
- lon
26+
- syd
2127
example: nyc
2228

2329
domains:
@@ -65,5 +71,8 @@ properties:
6571
items:
6672
$ref: app_database_spec.yml
6773

74+
ingress:
75+
$ref: app_ingress_spec.yml
76+
6877
required:
6978
- name

examples/digital-ocean-api/resources/apps/models/apps_domain.yml

+15
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,19 @@ properties:
99
$ref: apps_domain_progress.yml
1010
spec:
1111
$ref: app_domain_spec.yml
12+
validations:
13+
title: "List of TXT validation records"
14+
type: array
15+
items:
16+
$ref: app_domain_validation.yml
17+
rotate_validation_records:
18+
title: "Validation values have changed and require manual intervention"
19+
type: boolean
20+
readOnly: true
21+
certificate_expires_at:
22+
title: "Current SSL certificate expiration time"
23+
type: string
24+
format: date-time
25+
readOnly: true
26+
example: "2024-01-29T23:59:59Z"
1227
type: object

0 commit comments

Comments
 (0)