Skip to content

Commit 86e49ef

Browse files
committed
generate: add network types to nullable exception
Added network types to the nullable exception.
1 parent a65e25f commit 86e49ef

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

internal/generate/exceptions.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ func nullable() []string {
2626
// the usage of this type. Remove when this is fixed in the upstream API
2727
return []string{
2828
"InstanceDiskAttachment",
29+
"LldpLinkConfig",
30+
"TxEqConfig",
31+
"TxEqConfig2",
2932
}
3033
}

internal/generate/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"net/url"
1010
"os"
1111
"path/filepath"
12+
"strings"
1213

1314
"github.com/getkin/kin-openapi/openapi3"
1415
)
@@ -58,7 +59,7 @@ func loadAPIFromFile(file string) (*openapi3.T, error) {
5859
if err != nil {
5960
return nil, fmt.Errorf("error retrieving Omicron version: %v", err)
6061
}
61-
ov := string(omicronVersion)
62+
ov := strings.TrimSpace(string(omicronVersion))
6263

6364
// TODO: actually host the spec here.
6465
// uri := "https://api.oxide.computer"

oxide/types.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)