You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add check for API rule validation and fix type for Memcached test data (#2113)
* add api rules validation
* doc: note improvement review
* add TODO a requested in the review
* Update doc/user-guide.md
Co-Authored-By: Joe Lanford <[email protected]>
Copy file name to clipboardExpand all lines: doc/user-guide.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -85,11 +85,14 @@ type MemcachedSpec struct {
85
85
Sizeint32`json:"size"`
86
86
}
87
87
typeMemcachedStatusstruct {
88
-
// Nodes are the names of the memcached pods
88
+
// Nodes are the names of the memcached pods
89
+
// +listType=set
89
90
Nodes []string`json:"nodes"`
90
91
}
91
92
```
92
93
94
+
**NOTE:** Comment directives, such as +listType=set, are necessary in certain situations to avoid API rule violations when generating OpenAPI files. See https://godoc.org/k8s.io/kube-openapi/pkg/idl to learn more.
95
+
93
96
After modifying the `*_types.go` file always run the following command to update the generated code for that resource type:
0 commit comments