Skip to content

Commit a65e25f

Browse files
authored
Update to Omicron 1b4b019 (#298)
oxidecomputer/omicron#8274 changed the way "hidden" endpoints were handled. In place of this "hidden" tag, we now have "experimental" and "console-auth". This commit updates the generator to handle the change in these tags.
1 parent c63d62d commit a65e25f

File tree

3 files changed

+165
-7
lines changed

3 files changed

+165
-7
lines changed

VERSION_OMICRON

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rel/v15/rc1
1+
1b4b019

internal/generate/paths.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,18 @@ func buildMethod(f *os.File, spec *openapi3.T, method string, path string, o *op
135135
return err
136136
}
137137

138-
if len(o.Tags) == 0 || o.Tags[0] == "hidden" {
139-
fmt.Printf("[WARN] TODO: skipping operation %q, since it has no tag or is hidden\n", o.OperationID)
138+
if len(o.Tags) == 0 {
139+
fmt.Printf("[WARN] TODO: skipping operation %q, since it has no tag\n", o.OperationID)
140+
return nil
141+
}
142+
143+
if o.Tags[0] == "experimental" {
144+
fmt.Printf("[WARN] TODO: skipping operation %q, since it is experimental\n", o.OperationID)
145+
return nil
146+
}
147+
148+
if o.Tags[0] == "console-auth" {
149+
fmt.Printf("[WARN] TODO: skipping operation %q, since it is for console authentication\n", o.OperationID)
140150
return nil
141151
}
142152

oxide/types.go

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

0 commit comments

Comments
 (0)