We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72c1c0d commit 46f039bCopy full SHA for 46f039b
pkg/generators/openapi_test.go
@@ -1635,6 +1635,8 @@ type Blah struct {
1635
// Value is the value.
1636
Value EnumType
1637
NoCommentEnum EnumType
1638
+ // +optional
1639
+ OptionalEnum *EnumType
1640
}`)
1641
if callErr != nil {
1642
t.Fatal(callErr)
@@ -1666,6 +1668,13 @@ Type: []string{"string"},
1666
1668
Format: "",
1667
1669
Enum: []interface{}{"a", "b"}},
1670
},
1671
+"OptionalEnum": {
1672
+SchemaProps: spec.SchemaProps{`+"\n"+
1673
+ "Description: \"Possible enum values:\\n - `\\\"a\\\"` is a.\\n - `\\\"b\\\"` is b.\","+`
1674
+Type: []string{"string"},
1675
+Format: "",
1676
+Enum: []interface{}{"a", "b"}},
1677
+},
1678
1679
Required: []string{"Value","NoCommentEnum"},
1680
0 commit comments