Skip to content

Commit 84ca4cc

Browse files
fix: avoid fallback on default projectId and organizationId for optional fields (#478)
Co-authored-by: Vincent Germain <[email protected]>
1 parent 276302a commit 84ca4cc

File tree

20 files changed

+94
-382
lines changed

20 files changed

+94
-382
lines changed

packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,13 @@ export class API extends ParentAPI {
136136
)}/servers`,
137137
urlParams: urlParams(
138138
['order_by', request.orderBy ?? 'created_at_asc'],
139-
[
140-
'organization_id',
141-
request.organizationId ??
142-
this.client.settings.defaultOrganizationId,
143-
],
139+
['organization_id', request.organizationId],
144140
['page', request.page],
145141
[
146142
'page_size',
147143
request.pageSize ?? this.client.settings.defaultPageSize,
148144
],
149-
[
150-
'project_id',
151-
request.projectId ?? this.client.settings.defaultProjectId,
152-
],
145+
['project_id', request.projectId],
153146
),
154147
},
155148
unmarshalListServersResponse,

packages/clients/src/api/baremetal/v1/api.gen.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,13 @@ export class API extends ParentAPI {
117117
['name', request.name],
118118
['option_id', request.optionId],
119119
['order_by', request.orderBy ?? 'created_at_asc'],
120-
[
121-
'organization_id',
122-
request.organizationId ??
123-
this.client.settings.defaultOrganizationId,
124-
],
120+
['organization_id', request.organizationId],
125121
['page', request.page],
126122
[
127123
'page_size',
128124
request.pageSize ?? this.client.settings.defaultPageSize,
129125
],
130-
[
131-
'project_id',
132-
request.projectId ?? this.client.settings.defaultProjectId,
133-
],
126+
['project_id', request.projectId],
134127
['status', request.status],
135128
['tags', request.tags],
136129
),
@@ -810,21 +803,14 @@ export class PrivateNetworkAPI extends ParentAPI {
810803
)}/server-private-networks`,
811804
urlParams: urlParams(
812805
['order_by', request.orderBy ?? 'created_at_asc'],
813-
[
814-
'organization_id',
815-
request.organizationId ??
816-
this.client.settings.defaultOrganizationId,
817-
],
806+
['organization_id', request.organizationId],
818807
['page', request.page],
819808
[
820809
'page_size',
821810
request.pageSize ?? this.client.settings.defaultPageSize,
822811
],
823812
['private_network_id', request.privateNetworkId],
824-
[
825-
'project_id',
826-
request.projectId ?? this.client.settings.defaultProjectId,
827-
],
813+
['project_id', request.projectId],
828814
['server_id', request.serverId],
829815
),
830816
},

packages/clients/src/api/container/v1beta1/api.gen.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,13 @@ export class API extends ParentAPI {
103103
urlParams: urlParams(
104104
['name', request.name],
105105
['order_by', request.orderBy ?? 'created_at_asc'],
106-
[
107-
'organization_id',
108-
request.organizationId ??
109-
this.client.settings.defaultOrganizationId,
110-
],
106+
['organization_id', request.organizationId],
111107
['page', request.page],
112108
[
113109
'page_size',
114110
request.pageSize ?? this.client.settings.defaultPageSize,
115111
],
116-
[
117-
'project_id',
118-
request.projectId ?? this.client.settings.defaultProjectId,
119-
],
112+
['project_id', request.projectId],
120113
),
121114
},
122115
unmarshalListNamespacesResponse,
@@ -243,20 +236,13 @@ export class API extends ParentAPI {
243236
['name', request.name],
244237
['namespace_id', request.namespaceId],
245238
['order_by', request.orderBy ?? 'created_at_asc'],
246-
[
247-
'organization_id',
248-
request.organizationId ??
249-
this.client.settings.defaultOrganizationId,
250-
],
239+
['organization_id', request.organizationId],
251240
['page', request.page],
252241
[
253242
'page_size',
254243
request.pageSize ?? this.client.settings.defaultPageSize,
255244
],
256-
[
257-
'project_id',
258-
request.projectId ?? this.client.settings.defaultProjectId,
259-
],
245+
['project_id', request.projectId],
260246
),
261247
},
262248
unmarshalListContainersResponse,

packages/clients/src/api/domain/v2beta1/api.gen.ts

Lines changed: 13 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,13 @@ export class API extends ParentAPI {
173173
['dns_zone', request.dnsZone],
174174
['domain', request.domain],
175175
['order_by', request.orderBy ?? 'domain_asc'],
176-
[
177-
'organization_id',
178-
request.organizationId ??
179-
this.client.settings.defaultOrganizationId,
180-
],
176+
['organization_id', request.organizationId],
181177
['page', request.page],
182178
[
183179
'page_size',
184180
request.pageSize ?? this.client.settings.defaultPageSize,
185181
],
186-
[
187-
'project_id',
188-
request.projectId ?? this.client.settings.defaultProjectId,
189-
],
182+
['project_id', request.projectId],
190183
),
191184
},
192185
unmarshalListDNSZonesResponse,
@@ -306,10 +299,7 @@ export class API extends ParentAPI {
306299
'page_size',
307300
request.pageSize ?? this.client.settings.defaultPageSize,
308301
],
309-
[
310-
'project_id',
311-
request.projectId ?? this.client.settings.defaultProjectId,
312-
],
302+
['project_id', request.projectId],
313303
['type', request.type ?? 'unknown'],
314304
),
315305
},
@@ -379,10 +369,7 @@ export class API extends ParentAPI {
379369
'dnsZone',
380370
request.dnsZone,
381371
)}/nameservers`,
382-
urlParams: urlParams([
383-
'project_id',
384-
request.projectId ?? this.client.settings.defaultProjectId,
385-
]),
372+
urlParams: urlParams(['project_id', request.projectId]),
386373
},
387374
unmarshalListDNSZoneNameserversResponse,
388375
)
@@ -696,10 +683,7 @@ export class API extends ParentAPI {
696683
'page_size',
697684
request.pageSize ?? this.client.settings.defaultPageSize,
698685
],
699-
[
700-
'project_id',
701-
request.projectId ?? this.client.settings.defaultProjectId,
702-
],
686+
['project_id', request.projectId],
703687
),
704688
},
705689
unmarshalListSSLCertificatesResponse,
@@ -781,20 +765,13 @@ export class RegistrarAPI extends ParentAPI {
781765
urlParams: urlParams(
782766
['domain', request.domain],
783767
['order_by', request.orderBy ?? 'domain_desc'],
784-
[
785-
'organization_id',
786-
request.organizationId ??
787-
this.client.settings.defaultOrganizationId,
788-
],
768+
['organization_id', request.organizationId],
789769
['page', request.page],
790770
[
791771
'page_size',
792772
request.pageSize ?? this.client.settings.defaultPageSize,
793773
],
794-
[
795-
'project_id',
796-
request.projectId ?? this.client.settings.defaultProjectId,
797-
],
774+
['project_id', request.projectId],
798775
['statuses', request.statuses],
799776
['types', request.types],
800777
),
@@ -978,20 +955,13 @@ export class RegistrarAPI extends ParentAPI {
978955
path: `/domain/v2beta1/contacts`,
979956
urlParams: urlParams(
980957
['domain', request.domain],
981-
[
982-
'organization_id',
983-
request.organizationId ??
984-
this.client.settings.defaultOrganizationId,
985-
],
958+
['organization_id', request.organizationId],
986959
['page', request.page],
987960
[
988961
'page_size',
989962
request.pageSize ?? this.client.settings.defaultPageSize,
990963
],
991-
[
992-
'project_id',
993-
request.projectId ?? this.client.settings.defaultProjectId,
994-
],
964+
['project_id', request.projectId],
995965
),
996966
},
997967
unmarshalListContactsResponse,
@@ -1062,20 +1032,13 @@ export class RegistrarAPI extends ParentAPI {
10621032
['domain', request.domain],
10631033
['is_external', request.isExternal],
10641034
['order_by', request.orderBy ?? 'domain_asc'],
1065-
[
1066-
'organization_id',
1067-
request.organizationId ??
1068-
this.client.settings.defaultOrganizationId,
1069-
],
1035+
['organization_id', request.organizationId],
10701036
['page', request.page],
10711037
[
10721038
'page_size',
10731039
request.pageSize ?? this.client.settings.defaultPageSize,
10741040
],
1075-
[
1076-
'project_id',
1077-
request.projectId ?? this.client.settings.defaultProjectId,
1078-
],
1041+
['project_id', request.projectId],
10791042
['registrar', request.registrar],
10801043
['status', request.status ?? 'status_unknown'],
10811044
),
@@ -1101,20 +1064,13 @@ export class RegistrarAPI extends ParentAPI {
11011064
path: `/domain/v2beta1/renewable-domains`,
11021065
urlParams: urlParams(
11031066
['order_by', request.orderBy ?? 'domain_asc'],
1104-
[
1105-
'organization_id',
1106-
request.organizationId ??
1107-
this.client.settings.defaultOrganizationId,
1108-
],
1067+
['organization_id', request.organizationId],
11091068
['page', request.page],
11101069
[
11111070
'page_size',
11121071
request.pageSize ?? this.client.settings.defaultPageSize,
11131072
],
1114-
[
1115-
'project_id',
1116-
request.projectId ?? this.client.settings.defaultProjectId,
1117-
],
1073+
['project_id', request.projectId],
11181074
),
11191075
},
11201076
unmarshalListRenewableDomainsResponse,

packages/clients/src/api/domain/v2beta1/marshalling.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ export const marshalCloneDNSZoneRequest = (
16671667
): Record<string, unknown> => ({
16681668
dest_dns_zone: request.destDnsZone,
16691669
overwrite: request.overwrite,
1670-
project_id: request.projectId ?? defaults.defaultProjectId,
1670+
project_id: request.projectId,
16711671
})
16721672

16731673
export const marshalCreateDNSZoneRequest = (
@@ -1862,7 +1862,7 @@ export const marshalRegistrarApiTradeDomainRequest = (
18621862
request: RegistrarApiTradeDomainRequest,
18631863
defaults: DefaultValues,
18641864
): Record<string, unknown> => ({
1865-
project_id: request.projectId ?? defaults.defaultProjectId,
1865+
project_id: request.projectId,
18661866
...resolveOneOf<unknown>([
18671867
{
18681868
param: 'new_owner_contact_id',

packages/clients/src/api/flexibleip/v1alpha1/api.gen.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,13 @@ export class API extends ParentAPI {
127127
)}/fips`,
128128
urlParams: urlParams(
129129
['order_by', request.orderBy ?? 'created_at_asc'],
130-
[
131-
'organization_id',
132-
request.organizationId ??
133-
this.client.settings.defaultOrganizationId,
134-
],
130+
['organization_id', request.organizationId],
135131
['page', request.page],
136132
[
137133
'page_size',
138134
request.pageSize ?? this.client.settings.defaultPageSize,
139135
],
140-
[
141-
'project_id',
142-
request.projectId ?? this.client.settings.defaultProjectId,
143-
],
136+
['project_id', request.projectId],
144137
['server_ids', request.serverIds],
145138
['status', request.status],
146139
['tags', request.tags],

packages/clients/src/api/function/v1beta1/api.gen.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,13 @@ export class API extends ParentAPI {
124124
urlParams: urlParams(
125125
['name', request.name],
126126
['order_by', request.orderBy ?? 'created_at_asc'],
127-
[
128-
'organization_id',
129-
request.organizationId ??
130-
this.client.settings.defaultOrganizationId,
131-
],
127+
['organization_id', request.organizationId],
132128
['page', request.page],
133129
[
134130
'page_size',
135131
request.pageSize ?? this.client.settings.defaultPageSize,
136132
],
137-
[
138-
'project_id',
139-
request.projectId ?? this.client.settings.defaultProjectId,
140-
],
133+
['project_id', request.projectId],
141134
),
142135
},
143136
unmarshalListNamespacesResponse,
@@ -264,20 +257,13 @@ export class API extends ParentAPI {
264257
['name', request.name],
265258
['namespace_id', request.namespaceId],
266259
['order_by', request.orderBy ?? 'created_at_asc'],
267-
[
268-
'organization_id',
269-
request.organizationId ??
270-
this.client.settings.defaultOrganizationId,
271-
],
260+
['organization_id', request.organizationId],
272261
['page', request.page],
273262
[
274263
'page_size',
275264
request.pageSize ?? this.client.settings.defaultPageSize,
276265
],
277-
[
278-
'project_id',
279-
request.projectId ?? this.client.settings.defaultProjectId,
280-
],
266+
['project_id', request.projectId],
281267
),
282268
},
283269
unmarshalListFunctionsResponse,

packages/clients/src/api/iam/v1alpha1/api.gen.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,13 @@ export class API extends ParentAPI {
106106
['disabled', request.disabled],
107107
['name', request.name],
108108
['order_by', request.orderBy ?? 'created_at_asc'],
109-
[
110-
'organization_id',
111-
request.organizationId ??
112-
this.client.settings.defaultOrganizationId,
113-
],
109+
['organization_id', request.organizationId],
114110
['page', request.page],
115111
[
116112
'page_size',
117113
request.pageSize ?? this.client.settings.defaultPageSize,
118114
],
119-
[
120-
'project_id',
121-
request.projectId ?? this.client.settings.defaultProjectId,
122-
],
115+
['project_id', request.projectId],
123116
),
124117
},
125118
unmarshalListSSHKeysResponse,
@@ -390,11 +383,7 @@ export class API extends ParentAPI {
390383
['group_ids', request.groupIds],
391384
['name', request.name],
392385
['order_by', request.orderBy ?? 'created_at_asc'],
393-
[
394-
'organization_id',
395-
request.organizationId ??
396-
this.client.settings.defaultOrganizationId,
397-
],
386+
['organization_id', request.organizationId],
398387
['page', request.page],
399388
[
400389
'page_size',

0 commit comments

Comments
 (0)