Skip to content

Commit 7568941

Browse files
authored
Revert top-level parameters object sometimes being optional (#1335) (#1355)
1 parent ec5522b commit 7568941

13 files changed

+981
-782
lines changed

.changeset/strange-birds-jam.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openapi-typescript": minor
3+
---
4+
5+
Revert optional parameters breaking change (v6.6.0, #1335)

packages/openapi-typescript/examples/digital-ocean-api.ts

+30-30
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ export interface external {
754754
* 1-Click application data, each of which will contain the the slug and type for the 1-Click.
755755
*/
756756
"resources/1-clicks/oneClicks_list.yml": {
757-
parameters?: {
757+
parameters: {
758758
query?: {
759759
type?: external["resources/1-clicks/parameters.yml"]["oneClicks_type"];
760760
};
@@ -905,7 +905,7 @@ export interface external {
905905
* @description This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default.
906906
*/
907907
"resources/actions/actions_list.yml": {
908-
parameters?: {
908+
parameters: {
909909
query?: {
910910
per_page?: external["shared/parameters.yml"]["per_page"];
911911
page?: external["shared/parameters.yml"]["page"];
@@ -1112,7 +1112,7 @@ export interface external {
11121112
* @description Create a new app by submitting an app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/).
11131113
*/
11141114
"resources/apps/apps_create.yml": {
1115-
parameters?: {
1115+
parameters: {
11161116
header?: {
11171117
Accept?: external["resources/apps/parameters.yml"]["accept"];
11181118
"Content-Type"?: external["resources/apps/parameters.yml"]["content-type"];
@@ -1497,7 +1497,7 @@ export interface external {
14971497
* @description List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app.
14981498
*/
14991499
"resources/apps/apps_list.yml": {
1500-
parameters?: {
1500+
parameters: {
15011501
query?: {
15021502
page?: external["shared/parameters.yml"]["page"];
15031503
per_page?: external["shared/parameters.yml"]["per_page"];
@@ -3277,7 +3277,7 @@ export interface external {
32773277
* @description To retrieve a list of all invoices, send a GET request to `/v2/customers/my/invoices`.
32783278
*/
32793279
"resources/billing/invoices_list.yml": {
3280-
parameters?: {
3280+
parameters: {
32813281
query?: {
32823282
per_page?: external["shared/parameters.yml"]["per_page"];
32833283
page?: external["shared/parameters.yml"]["page"];
@@ -3716,7 +3716,7 @@ export interface external {
37163716
* @description To list all of the CDN endpoints available on your account, send a GET request to `/v2/cdn/endpoints`.
37173717
*/
37183718
"resources/cdn/cdn_list_endpoints.yml": {
3719-
parameters?: {
3719+
parameters: {
37203720
query?: {
37213721
per_page?: external["shared/parameters.yml"]["per_page"];
37223722
page?: external["shared/parameters.yml"]["page"];
@@ -3959,7 +3959,7 @@ export interface external {
39593959
* @description To list all of the certificates available on your account, send a GET request to `/v2/certificates`.
39603960
*/
39613961
"resources/certificates/certificates_list.yml": {
3962-
parameters?: {
3962+
parameters: {
39633963
query?: {
39643964
per_page?: external["shared/parameters.yml"]["per_page"];
39653965
page?: external["shared/parameters.yml"]["page"];
@@ -4795,7 +4795,7 @@ export interface external {
47954795
* The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster.
47964796
*/
47974797
"resources/databases/databases_list_clusters.yml": {
4798-
parameters?: {
4798+
parameters: {
47994799
query?: {
48004800
tag_name?: external["resources/databases/parameters.yml"]["tag_name"];
48014801
};
@@ -6783,7 +6783,7 @@ export interface external {
67836783
* @description To retrieve a list of all of the domains in your account, send a GET request to `/v2/domains`.
67846784
*/
67856785
"resources/domains/domains_list.yml": {
6786-
parameters?: {
6786+
parameters: {
67876787
query?: {
67886788
per_page?: external["shared/parameters.yml"]["per_page"];
67896789
page?: external["shared/parameters.yml"]["page"];
@@ -7110,7 +7110,7 @@ export interface external {
71107110
* - `snapshot`
71117111
*/
71127112
"resources/droplets/dropletActions_post_byTag.yml": {
7113-
parameters?: {
7113+
parameters: {
71147114
query?: {
71157115
tag_name?: external["resources/droplets/parameters.yml"]["droplet_tag_name"];
71167116
};
@@ -7603,7 +7603,7 @@ export interface external {
76037603
* `/v2/droplets?tag_name=$TAG_NAME`.
76047604
*/
76057605
"resources/droplets/droplets_list.yml": {
7606-
parameters?: {
7606+
parameters: {
76077607
query?: {
76087608
per_page?: external["shared/parameters.yml"]["per_page"];
76097609
page?: external["shared/parameters.yml"]["page"];
@@ -8683,7 +8683,7 @@ export interface external {
86838683
* @description To list all of the firewalls available on your account, send a GET request to `/v2/firewalls`.
86848684
*/
86858685
"resources/firewalls/firewalls_list.yml": {
8686-
parameters?: {
8686+
parameters: {
86878687
query?: {
86888688
per_page?: external["shared/parameters.yml"]["per_page"];
86898689
page?: external["shared/parameters.yml"]["page"];
@@ -8945,7 +8945,7 @@ export interface external {
89458945
* @description To list all of the floating IPs available on your account, send a GET request to `/v2/floating_ips`.
89468946
*/
89478947
"resources/floating_ips/floatingIPs_list.yml": {
8948-
parameters?: {
8948+
parameters: {
89498949
query?: {
89508950
per_page?: external["shared/parameters.yml"]["per_page"];
89518951
page?: external["shared/parameters.yml"]["page"];
@@ -9804,7 +9804,7 @@ export interface external {
98049804
* To list all images assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your GET request. For example, `/v2/images?tag_name=$TAG_NAME`.
98059805
*/
98069806
"resources/images/images_list.yml": {
9807-
parameters?: {
9807+
parameters: {
98089808
query?: {
98099809
type?: external["resources/images/parameters.yml"]["type"];
98109810
private?: external["resources/images/parameters.yml"]["private"];
@@ -10443,7 +10443,7 @@ export interface external {
1044310443
* to `/v2/kubernetes/clusters`.
1044410444
*/
1044510445
"resources/kubernetes/kubernetes_list_clusters.yml": {
10446-
parameters?: {
10446+
parameters: {
1044710447
query?: {
1044810448
per_page?: external["shared/parameters.yml"]["per_page"];
1044910449
page?: external["shared/parameters.yml"]["page"];
@@ -11508,7 +11508,7 @@ export interface external {
1150811508
* to `/v2/load_balancers`.
1150911509
*/
1151011510
"resources/load_balancers/loadBalancers_list.yml": {
11511-
parameters?: {
11511+
parameters: {
1151211512
query?: {
1151311513
per_page?: external["shared/parameters.yml"]["per_page"];
1151411514
page?: external["shared/parameters.yml"]["page"];
@@ -12372,7 +12372,7 @@ export interface external {
1237212372
* @description Returns all alert policies that are configured for the given account. To List all alert policies, send a GET request to `/v2/monitoring/alerts`.
1237312373
*/
1237412374
"resources/monitoring/monitoring_list_alertPolicy.yml": {
12375-
parameters?: {
12375+
parameters: {
1237612376
query?: {
1237712377
per_page?: external["shared/parameters.yml"]["per_page"];
1237812378
page?: external["shared/parameters.yml"]["page"];
@@ -12787,7 +12787,7 @@ export interface external {
1278712787
* @description To list all your projects, send a GET request to `/v2/projects`.
1278812788
*/
1278912789
"resources/projects/projects_list.yml": {
12790-
parameters?: {
12790+
parameters: {
1279112791
query?: {
1279212792
per_page?: external["shared/parameters.yml"]["per_page"];
1279312793
page?: external["shared/parameters.yml"]["page"];
@@ -13023,7 +13023,7 @@ export interface external {
1302313023
* The response will be a JSON object with a key called `regions`. The value of this will be an array of `region` objects, each of which will contain the standard region attributes.
1302413024
*/
1302513025
"resources/regions/regions_list.yml": {
13026-
parameters?: {
13026+
parameters: {
1302713027
query?: {
1302813028
per_page?: external["shared/parameters.yml"]["per_page"];
1302913029
page?: external["shared/parameters.yml"]["page"];
@@ -13447,7 +13447,7 @@ export interface external {
1344713447
* credentials that expire after one hour.
1344813448
*/
1344913449
"resources/registry/registry_get_dockerCredentials.yml": {
13450-
parameters?: {
13450+
parameters: {
1345113451
query?: {
1345213452
expiry_seconds?: external["resources/registry/parameters.yml"]["registry_expiry_seconds"];
1345313453
read_write?: external["resources/registry/parameters.yml"]["registry_read_write"];
@@ -14036,7 +14036,7 @@ export interface external {
1403614036
* @description To list all of the reserved IPs available on your account, send a GET request to `/v2/reserved_ips`.
1403714037
*/
1403814038
"resources/reserved_ips/reservedIPs_list.yml": {
14039-
parameters?: {
14039+
parameters: {
1404014040
query?: {
1404114041
per_page?: external["shared/parameters.yml"]["per_page"];
1404214042
page?: external["shared/parameters.yml"]["page"];
@@ -14284,7 +14284,7 @@ export interface external {
1428414284
* The response will be a JSON object with a key called `sizes`. The value of this will be an array of `size` objects each of which contain the standard size attributes.
1428514285
*/
1428614286
"resources/sizes/sizes_list.yml": {
14287-
parameters?: {
14287+
parameters: {
1428814288
query?: {
1428914289
per_page?: external["shared/parameters.yml"]["per_page"];
1429014290
page?: external["shared/parameters.yml"]["page"];
@@ -14457,7 +14457,7 @@ export interface external {
1445714457
* query parameter set to `volume`. For example, `/v2/snapshots?resource_type=volume`.
1445814458
*/
1445914459
"resources/snapshots/snapshots_list.yml": {
14460-
parameters?: {
14460+
parameters: {
1446114461
query?: {
1446214462
per_page?: external["shared/parameters.yml"]["per_page"];
1446314463
page?: external["shared/parameters.yml"]["page"];
@@ -14597,7 +14597,7 @@ export interface external {
1459714597
* @description To list all of the keys in your account, send a GET request to `/v2/account/keys`. The response will be a JSON object with a key set to `ssh_keys`. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes.
1459814598
*/
1459914599
"resources/ssh_keys/sshKeys_list.yml": {
14600-
parameters?: {
14600+
parameters: {
1460114601
query?: {
1460214602
per_page?: external["shared/parameters.yml"]["per_page"];
1460314603
page?: external["shared/parameters.yml"]["page"];
@@ -14868,7 +14868,7 @@ export interface external {
1486814868
* @description To list all of your tags, you can send a GET request to `/v2/tags`.
1486914869
*/
1487014870
"resources/tags/tags_list.yml": {
14871-
parameters?: {
14871+
parameters: {
1487214872
query?: {
1487314873
per_page?: external["shared/parameters.yml"]["per_page"];
1487414874
page?: external["shared/parameters.yml"]["page"];
@@ -15090,7 +15090,7 @@ export interface external {
1509015090
* @description To list all of the Uptime checks on your account, send a GET request to `/v2/uptime/checks`.
1509115091
*/
1509215092
"resources/uptime/list_checks.yml": {
15093-
parameters?: {
15093+
parameters: {
1509415094
query?: {
1509515095
per_page?: external["shared/parameters.yml"]["per_page"];
1509615096
page?: external["shared/parameters.yml"]["page"];
@@ -15694,7 +15694,7 @@ export interface external {
1569415694
* | region | Set to the slug representing the region where the volume is located |
1569515695
*/
1569615696
"resources/volumes/volumeActions_post.yml": {
15697-
parameters?: {
15697+
parameters: {
1569815698
query?: {
1569915699
per_page?: external["shared/parameters.yml"]["per_page"];
1570015700
page?: external["shared/parameters.yml"]["page"];
@@ -15740,7 +15740,7 @@ export interface external {
1574015740
* No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.
1574115741
*/
1574215742
"resources/volumes/volumes_delete_byName.yml": {
15743-
parameters?: {
15743+
parameters: {
1574415744
query?: {
1574515745
name?: external["resources/volumes/parameters.yml"]["volume_name"];
1574615746
region?: external["shared/parameters.yml"]["region"];
@@ -15807,7 +15807,7 @@ export interface external {
1580715807
* It is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume's name and the region slug for the region it is located in as query parameters to `/v2/volumes?name=$VOLUME_NAME&region=nyc1`.
1580815808
*/
1580915809
"resources/volumes/volumes_list.yml": {
15810-
parameters?: {
15810+
parameters: {
1581115811
query?: {
1581215812
name?: external["resources/volumes/parameters.yml"]["volume_name"];
1581315813
region?: external["shared/parameters.yml"]["region"];
@@ -16128,7 +16128,7 @@ export interface external {
1612816128
* @description To list all of the VPCs on your account, send a GET request to `/v2/vpcs`.
1612916129
*/
1613016130
"resources/vpcs/vpcs_list.yml": {
16131-
parameters?: {
16131+
parameters: {
1613216132
query?: {
1613316133
per_page?: external["shared/parameters.yml"]["per_page"];
1613416134
page?: external["shared/parameters.yml"]["page"];

0 commit comments

Comments
 (0)