Commit 434972e
committed
generate: set omitzero on specific types
Set `omitzero` on the following types to allow clients to set an empty
slice and have it serialized to `[]`, which is required by Oxide APIs to
unset a value.
* `[]VpcFirewallRuleUpdate`
* `[]NameOrId`
The previous behavior would omit an empty slice entirely during
serialization, causing the Oxide APIs to respond with an error.1 parent 2e4943b commit 434972e
3 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
545 | 554 | | |
546 | 555 | | |
547 | 556 | | |
| 557 | + | |
| 558 | + | |
548 | 559 | | |
549 | 560 | | |
550 | 561 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments