Skip to content

Commit

Permalink
fix: avoid default values for nested properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzius committed Nov 7, 2023
1 parent f6e127c commit b619281
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
6 changes: 1 addition & 5 deletions packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,7 @@ const marshalRuleSpecs = (
permission_set_names: request.permissionSetNames,
...resolveOneOf<unknown[] | string>([
{ param: 'project_ids', value: request.projectIds },
{
default: defaults.defaultOrganizationId,
param: 'organization_id',
value: request.organizationId,
},
{ param: 'organization_id', value: request.organizationId },
]),
})

Expand Down
18 changes: 5 additions & 13 deletions packages/clients/src/api/instance/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1555,16 +1555,8 @@ const marshalVolumeTemplate = (
size: request.size,
volume_type: request.volumeType,
...resolveOneOf([
{
default: defaults.defaultProjectId,
param: 'project',
value: request.project,
},
{
default: defaults.defaultOrganizationId,
param: 'organization',
value: request.organization,
},
{ param: 'project', value: request.project },
{ param: 'organization', value: request.organization },
]),
})

Expand Down Expand Up @@ -1705,8 +1697,8 @@ const marshalVolumeServerTemplate = (
boot: request.boot,
id: request.id,
name: request.name,
organization: request.organization ?? defaults.defaultOrganizationId,
project: request.project ?? defaults.defaultProjectId,
organization: request.organization,
project: request.project,
size: request.size,
volume_type: request.volumeType,
})
Expand Down Expand Up @@ -2011,7 +2003,7 @@ const marshalSetSecurityGroupRulesRequestRule = (
ip_range: request.ipRange,
position: request.position,
protocol: request.protocol,
zone: request.zone ?? defaults.defaultZone,
zone: request.zone,
})

export const marshalSetSecurityGroupRulesRequest = (
Expand Down

0 comments on commit b619281

Please sign in to comment.