Skip to content

Commit

Permalink
Boolean field in machine allocation network can not be optional.
Browse files Browse the repository at this point in the history
Swagger clients will omit the value due to a bug: swagger-api/swagger-codegen#7391
  • Loading branch information
Gerrit91 committed Jul 19, 2019
1 parent 1f3cd79 commit 582fb16
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/service/v1/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ type MachineAllocationNetworks []MachineAllocationNetwork

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

type MachineFinalizeAllocationRequest struct {
Expand Down
47 changes: 24 additions & 23 deletions spec/metal-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2627,12 +2627,12 @@
},
"v1.FirewallCreateRequest": {
"required": [
"projectid",
"imageid",
"sizeid",
"partitionid",
"ssh_pub_keys",
"tenant",
"imageid",
"projectid"
"partitionid"
],
"properties": {
"description": {
Expand Down Expand Up @@ -2711,18 +2711,18 @@
},
"v1.FirewallResponse": {
"required": [
"id",
"liveliness",
"changed",
"size",
"allocation",
"rackid",
"tags",
"hardware",
"id",
"state",
"events",
"partition",
"tags",
"state",
"created"
"rackid",
"changed",
"allocation",
"created",
"size"
],
"properties": {
"allocation": {
Expand Down Expand Up @@ -3152,7 +3152,8 @@
},
"v1.MachineAllocationNetwork": {
"required": [
"networkid"
"networkid",
"autoacquire"
],
"properties": {
"autoacquire": {
Expand Down Expand Up @@ -3231,9 +3232,9 @@
},
"v1.MachineHardware": {
"required": [
"memory",
"cpu_cores",
"disks",
"memory",
"nics"
],
"properties": {
Expand Down Expand Up @@ -3542,13 +3543,13 @@
"required": [
"id",
"partition",
"size",
"allocation",
"state",
"liveliness",
"events",
"rackid",
"size",
"hardware",
"events",
"state",
"liveliness",
"tags",
"created",
"changed"
Expand Down Expand Up @@ -3642,12 +3643,12 @@
"v1.NetworkCreateRequest": {
"required": [
"id",
"underlay",
"parentnetworkid",
"prefixes",
"destinationprefixes",
"nat",
"primary"
"primary",
"underlay",
"parentnetworkid"
],
"properties": {
"description": {
Expand Down Expand Up @@ -3711,12 +3712,12 @@
"v1.NetworkResponse": {
"required": [
"id",
"parentnetworkid",
"prefixes",
"destinationprefixes",
"nat",
"primary",
"underlay",
"parentnetworkid",
"usage",
"created",
"changed"
Expand Down Expand Up @@ -3934,8 +3935,8 @@
"required": [
"id",
"bootconfig",
"created",
"changed"
"changed",
"created"
],
"properties": {
"bootconfig": {
Expand Down

0 comments on commit 582fb16

Please sign in to comment.