@@ -1632,10 +1632,10 @@ const EnumB EnumType = "b"
1632
1632
// +k8s:openapi-gen=true
1633
1633
// +k8s:openapi-gen=x-kubernetes-type-tag:type_test
1634
1634
type Blah struct {
1635
- // Value is the value.
1635
+ // Value is the value.
1636
1636
Value EnumType
1637
1637
NoCommentEnum EnumType
1638
- // +optional
1638
+ // +optional
1639
1639
OptionalEnum *EnumType
1640
1640
}` )
1641
1641
if callErr != nil {
@@ -1653,26 +1653,26 @@ Description: "Blah is a test.",
1653
1653
Type: []string{"object"},
1654
1654
Properties: map[string]spec.Schema{
1655
1655
"Value": {
1656
- SchemaProps: spec.SchemaProps{` + " \n " +
1657
- " Description: \ " Value is the value.\\ n \\ nPossible enum values:\\ n - `\\ \ " a\\ \" ` is a.\\ n - `\\ \ " b\\ \" ` is b.\" ," + `
1656
+ SchemaProps: spec.SchemaProps{
1657
+ Description: "Value is the value.\n\ nPossible enum values:\n - ` + "`" + `\ "a\"` + "`" + ` is a.\n - `+ "`" + `\ "b\"` + "`" + ` is b.",
1658
1658
Default: "",
1659
1659
Type: []string{"string"},
1660
1660
Format: "",
1661
1661
Enum: []interface{}{"a", "b"},
1662
1662
},
1663
1663
},
1664
1664
"NoCommentEnum": {
1665
- SchemaProps: spec.SchemaProps{` + " \n " +
1666
- " Description: \ " Possible enum values:\\ n - `\\ \ " a\\ \" ` is a.\\ n - `\\ \ " b\\ \" ` is b.\" ," + `
1665
+ SchemaProps: spec.SchemaProps{
1666
+ Description: "Possible enum values:\n - ` + "`" + `\ "a\"` + "`" + ` is a.\n - `+ "`" + `\ "b\"` + "`" + ` is b.",
1667
1667
Default: "",
1668
1668
Type: []string{"string"},
1669
1669
Format: "",
1670
1670
Enum: []interface{}{"a", "b"},
1671
1671
},
1672
1672
},
1673
1673
"OptionalEnum": {
1674
- SchemaProps: spec.SchemaProps{` + " \n " +
1675
- " Description: \ " Possible enum values:\\ n - `\\ \ " a\\ \" ` is a.\\ n - `\\ \ " b\\ \" ` is b.\" ," + `
1674
+ SchemaProps: spec.SchemaProps{
1675
+ Description: "Possible enum values:\n - ` + "`" + `\ "a\"` + "`" + ` is a.\n - `+ "`" + `\ "b\"` + "`" + ` is b.",
1676
1676
Type: []string{"string"},
1677
1677
Format: "",
1678
1678
Enum: []interface{}{"a", "b"},
0 commit comments