Skip to content

Commit 3b48fde

Browse files
authored
openapi-typescript@7, [email protected] πŸŽ‰ (openapi-ts#1706)
* Breaking 0.10.0 changes * Update docs * Update lockfile
1 parent cbbc9b8 commit 3b48fde

Some content is hidden

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

51 files changed

+11061
-4879
lines changed

β€Žbiome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/1.8.1/schema.json",
33
"extends": ["../../biome.json"],
44
"files": {
55
"include": ["./bin/", "./src/", "./test/"],

β€Žexamples/digital-ocean-api.ts

Lines changed: 147 additions & 14 deletions
Large diffs are not rendered by default.

β€Žexamples/digital-ocean-api/description.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ introduction: |
2424
|GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.|
2525
|DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.|
2626
|PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.|
27-
|PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is is a set of instructions on how to modify a resource updating only specific attributes.|
27+
|PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is a set of instructions on how to modify a resource updating only specific attributes.|
2828
|POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.|
2929
|HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.|
3030
@@ -93,7 +93,7 @@ introduction: |
9393
9494
### Response for a Single Object
9595
96-
```
96+
```json
9797
{
9898
"droplet": {
9999
"name": "example.com"
@@ -104,7 +104,7 @@ introduction: |
104104
105105
### Response for an Object Collection
106106
107-
```
107+
```json
108108
{
109109
"droplets": [
110110
{
@@ -135,7 +135,7 @@ introduction: |
135135
136136
### Sample Meta Object
137137
138-
```
138+
```json
139139
{
140140
. . .
141141
"meta": {
@@ -175,7 +175,7 @@ introduction: |
175175
176176
### Sample Links Object
177177
178-
```
178+
```json
179179
{
180180
. . .
181181
"links": {
@@ -233,7 +233,7 @@ introduction: |
233233
234234
`ratelimit-remaining` reaching zero can also indicate that the "burst limit" of 250
235235
requests per minute limit was met, even if the 5,000 requests per hour limit was not.
236-
In this case, the 429 error response will include a retry-after header to indicate how
236+
In this case, the 429 error response will include a `retry-after` header to indicate how
237237
long to wait (in seconds) until the request may be retried.
238238
239239
You can see the format of the response in the examples.

β€Žexamples/digital-ocean-api/resources/apps/apps_create.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ requestBody:
3131
run_command: bin/api
3232
environment_slug: node-js
3333
instance_count: 2
34-
instance_size_slug: basic-xxs
34+
instance_size_slug: apps-s-1vcpu-0.5gb
3535
routes:
3636
- path: /api
37+
egress:
38+
type: DEDICATED_IP
3739
required: true
3840

3941
responses:

β€Žexamples/digital-ocean-api/resources/apps/apps_get_tier.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
operationId: apps_get_tier
22

3+
deprecated: true
4+
35
summary: Retrieve an App Tier
46

5-
description: Retrieve information about a specific app tier.
7+
description: |
8+
Retrieve information about a specific app tier.
9+
This endpoint has been deprecated because app tiers are not tied to instance sizes anymore.
10+
The concept of tiers will be retired in the future.
611
712
tags:
813
- Apps

β€Žexamples/digital-ocean-api/resources/apps/apps_list_tiers.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
operationId: apps_list_tiers
22

3+
deprecated: true
4+
35
summary: List App Tiers
46

5-
description: List all app tiers.
7+
description: |
8+
List all app tiers.
9+
This endpoint has been deprecated because app tiers are not tied to instance sizes anymore.
10+
The concept of tiers will be retired in the future.
611
712
tags:
813
- Apps
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
operationId: apps_toggle_database_trusted_source
2+
3+
summary: Toggle Database Trusted Source
4+
5+
description: Toggles the trusted source status of a database component for a given app.
6+
7+
tags:
8+
- Apps
9+
10+
parameters:
11+
- $ref: parameters.yml#/app_id
12+
13+
requestBody:
14+
content:
15+
application/json:
16+
schema:
17+
$ref: models/toggle_database_trusted_source_request.yml
18+
required: true
19+
20+
responses:
21+
"200":
22+
$ref: responses/toggle_database_trusted_source.yml
23+
24+
"400":
25+
$ref: ../../shared/responses/bad_request.yml
26+
27+
"401":
28+
$ref: ../../shared/responses/unauthorized.yml
29+
30+
"404":
31+
$ref: '../../shared/responses/not_found.yml'
32+
33+
"429":
34+
$ref: "../../shared/responses/too_many_requests.yml"
35+
36+
"500":
37+
$ref: ../../shared/responses/server_error.yml
38+
39+
default:
40+
$ref: ../../shared/responses/unexpected_error.yml
41+
42+
x-codeSamples:
43+
- $ref: 'examples/curl/apps_toggle_database_trusted_source.yml'
44+
- $ref: 'examples/python/apps_toggle_database_trusted_source.yml'
45+
46+
security:
47+
- bearer_auth:
48+
- 'app:update'

β€Žexamples/digital-ocean-api/resources/apps/apps_validate_appSpec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ requestBody:
2929
run_command: bin/api
3030
environment_slug: node-js
3131
instance_count: 2
32-
instance_size_slug: basic-xxs
32+
instance_size_slug: apps-s-1vcpu-0.5gb
3333
routes:
3434
- path: /api
3535
app_id: b6bdf840-2854-4f87-a36c-5f231c617c84

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ source: |-
88
"services":[{"name":"api","github":{"branch":"main",\
99
"deploy_on_push":true,"repo":"digitalocean/sample-golang"}, \
1010
"run_command":"bin/api","environment_slug":"node-js", \
11-
"instance_count":2,"instance_size_slug":"basic-xxs", \
11+
"instance_count":2,"instance_size_slug":"apps-s-1vcpu-0.5gb", \
1212
"routes":[{"path":"/api"}]}]}}'
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 POST https://api.digitalocean.com/v2/apps/{app_id}/components/{component_name}/trusted_sources \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{ "enable": true }'

0 commit comments

Comments
Β (0)