Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .changelog/v0.6.0.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[breaking]]
title = ""
description = ""
title = "`VpcFirewallRuleProtocol` type change"
description = "Changed the type of the `VpcFirewallRuleProtocol` struct to reflect upstream API changes. [#304](https://github.com/oxidecomputer/oxide.go/pull/304)"

[[features]]
title = ""
Expand All @@ -12,4 +12,4 @@ description = ""

[[enhancements]]
title = ""
description = ""
description = ""
2 changes: 1 addition & 1 deletion VERSION_OMICRON
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1b4b019
53aea85
5 changes: 5 additions & 0 deletions internal/generate/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,11 @@ func createOneOf(s *openapi3.Schema, name, typeName string) ([]TypeTemplate, []E
field.Type = "any"
}

// Check if the field is nullable and use omitzero instead of omitempty.
if p.Value != nil && p.Value.Nullable {
field.SerializationInfo = fmt.Sprintf("`json:\"%s,omitzero\" yaml:\"%s,omitzero\"`", prop, prop)
}

fields = append(fields, field)

parsedProperties = append(parsedProperties, propertyName)
Expand Down
Loading