Skip to content

Commit 34f4570

Browse files
oxide: update to omicron version 53aea85 (#304)
Updated Omicron to oxidecomputer/omicron@53aea85. This pulls in the updating VPC firewall rules enums from oxidecomputer/omicron#8194. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 01e729a commit 34f4570

File tree

5 files changed

+688
-216
lines changed

5 files changed

+688
-216
lines changed

.changelog/v0.6.0.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[breaking]]
2-
title = ""
3-
description = ""
2+
title = "`VpcFirewallRuleProtocol` type change"
3+
description = "Changed the type of the `VpcFirewallRuleProtocol` struct to reflect upstream API changes. [#304](https://github.com/oxidecomputer/oxide.go/pull/304)"
44

55
[[features]]
66
title = ""
@@ -12,4 +12,4 @@ description = ""
1212

1313
[[enhancements]]
1414
title = ""
15-
description = ""
15+
description = ""

VERSION_OMICRON

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1b4b019
1+
53aea85

internal/generate/types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,11 @@ func createOneOf(s *openapi3.Schema, name, typeName string) ([]TypeTemplate, []E
743743
field.Type = "any"
744744
}
745745

746+
// Check if the field is nullable and use omitzero instead of omitempty.
747+
if p.Value != nil && p.Value.Nullable {
748+
field.SerializationInfo = fmt.Sprintf("`json:\"%s,omitzero\" yaml:\"%s,omitzero\"`", prop, prop)
749+
}
750+
746751
fields = append(fields, field)
747752

748753
parsedProperties = append(parsedProperties, propertyName)

0 commit comments

Comments
 (0)