Skip to content

Commit 582fb16

Browse files
committed
Boolean field in machine allocation network can not be optional.
Swagger clients will omit the value due to a bug: swagger-api/swagger-codegen#7391
1 parent 1f3cd79 commit 582fb16

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

cmd/metal-api/internal/service/v1/machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ type MachineAllocationNetworks []MachineAllocationNetwork
155155

156156
type MachineAllocationNetwork struct {
157157
NetworkID string `json:"networkid" description:"the id of the network that this machine will be placed in"`
158-
AutoAcquireIP *bool `json:"autoacquire" description:"will automatically acquire an ip in this network if set to true, default is true" optional:"true"`
158+
AutoAcquireIP *bool `json:"autoacquire" description:"will automatically acquire an ip in this network if set to true, default is true"`
159159
}
160160

161161
type MachineFinalizeAllocationRequest struct {

spec/metal-api.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,12 +2627,12 @@
26272627
},
26282628
"v1.FirewallCreateRequest": {
26292629
"required": [
2630+
"projectid",
2631+
"imageid",
26302632
"sizeid",
2631-
"partitionid",
26322633
"ssh_pub_keys",
26332634
"tenant",
2634-
"imageid",
2635-
"projectid"
2635+
"partitionid"
26362636
],
26372637
"properties": {
26382638
"description": {
@@ -2711,18 +2711,18 @@
27112711
},
27122712
"v1.FirewallResponse": {
27132713
"required": [
2714+
"id",
27142715
"liveliness",
2715-
"changed",
2716-
"size",
2717-
"allocation",
2718-
"rackid",
2716+
"tags",
27192717
"hardware",
2720-
"id",
2718+
"state",
27212719
"events",
27222720
"partition",
2723-
"tags",
2724-
"state",
2725-
"created"
2721+
"rackid",
2722+
"changed",
2723+
"allocation",
2724+
"created",
2725+
"size"
27262726
],
27272727
"properties": {
27282728
"allocation": {
@@ -3152,7 +3152,8 @@
31523152
},
31533153
"v1.MachineAllocationNetwork": {
31543154
"required": [
3155-
"networkid"
3155+
"networkid",
3156+
"autoacquire"
31563157
],
31573158
"properties": {
31583159
"autoacquire": {
@@ -3231,9 +3232,9 @@
32313232
},
32323233
"v1.MachineHardware": {
32333234
"required": [
3235+
"memory",
32343236
"cpu_cores",
32353237
"disks",
3236-
"memory",
32373238
"nics"
32383239
],
32393240
"properties": {
@@ -3542,13 +3543,13 @@
35423543
"required": [
35433544
"id",
35443545
"partition",
3545-
"size",
35463546
"allocation",
3547-
"state",
3548-
"liveliness",
3547+
"events",
35493548
"rackid",
3549+
"size",
35503550
"hardware",
3551-
"events",
3551+
"state",
3552+
"liveliness",
35523553
"tags",
35533554
"created",
35543555
"changed"
@@ -3642,12 +3643,12 @@
36423643
"v1.NetworkCreateRequest": {
36433644
"required": [
36443645
"id",
3645-
"underlay",
3646-
"parentnetworkid",
36473646
"prefixes",
36483647
"destinationprefixes",
36493648
"nat",
3650-
"primary"
3649+
"primary",
3650+
"underlay",
3651+
"parentnetworkid"
36513652
],
36523653
"properties": {
36533654
"description": {
@@ -3711,12 +3712,12 @@
37113712
"v1.NetworkResponse": {
37123713
"required": [
37133714
"id",
3715+
"parentnetworkid",
37143716
"prefixes",
37153717
"destinationprefixes",
37163718
"nat",
37173719
"primary",
37183720
"underlay",
3719-
"parentnetworkid",
37203721
"usage",
37213722
"created",
37223723
"changed"
@@ -3934,8 +3935,8 @@
39343935
"required": [
39353936
"id",
39363937
"bootconfig",
3937-
"created",
3938-
"changed"
3938+
"changed",
3939+
"created"
39393940
],
39403941
"properties": {
39413942
"bootconfig": {

0 commit comments

Comments
 (0)