Conversation
| if len(keys) == 1 && p.Value.Enum == nil { | ||
| enumFieldName = propertyName | ||
| } |
There was a problem hiding this comment.
This code handles the case for https://github.com/oxidecomputer/oxide.go/pull/284/files#diff-841a2b1b5f072b633551cac9c34c9732a722b415e297a1530b92d5988962062eR3728-R3750 Without handling, the result was that they all were named InterfaceNum because they aren't being explicitly marked as an enum, but used as one, and OpenAPI still sees this as a valid spec
sudomateo
left a comment
There was a problem hiding this comment.
I haven't used the affected upstream API routes but the changes here look good to me.
| // Required fields: | ||
| // - IEEE802 | ||
| type NetworkAddressIeee802 struct { | ||
| IEEE802 []string `json:"i_e_e_e802,omitempty" yaml:"i_e_e_e802,omitempty"` |
There was a problem hiding this comment.
The i_e_e_e802 JSON field read weird to me but that's how it is in the OpenAPI specification on omicron.
| if len(keys) == 1 && p.Value.Enum == nil { | ||
| enumFieldName = propertyName | ||
| } |
|
Just FYI the commit and PR title typo |
lol whoops |
No description provided.