@@ -147,6 +147,12 @@ func (b *APIs) getDuration() string {
147147}`
148148}
149149
150+ func (b * APIs ) getQuantity () string {
151+ return `v1beta1.JSONSchemaProps{
152+ Type: "string",
153+ }`
154+ }
155+
150156func (b * APIs ) objSchema () string {
151157 return `v1beta1.JSONSchemaProps{
152158 Type: "object",
@@ -159,6 +165,7 @@ func (b *APIs) typeToJSONSchemaProps(t *types.Type, found sets.String, comments
159165 // Special cases
160166 time := types.Name {Name : "Time" , Package : "k8s.io/apimachinery/pkg/apis/meta/v1" }
161167 duration := types.Name {Name : "Duration" , Package : "k8s.io/apimachinery/pkg/apis/meta/v1" }
168+ quantity := types.Name {Name : "Quantity" , Package : "k8s.io/apimachinery/pkg/api/resource" }
162169 meta := types.Name {Name : "ObjectMeta" , Package : "k8s.io/apimachinery/pkg/apis/meta/v1" }
163170 unstructured := types.Name {Name : "Unstructured" , Package : "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" }
164171 rawExtension := types.Name {Name : "RawExtension" , Package : "k8s.io/apimachinery/pkg/runtime" }
@@ -178,6 +185,9 @@ func (b *APIs) typeToJSONSchemaProps(t *types.Type, found sets.String, comments
178185 case duration :
179186 specialTypeProps .Type = "string"
180187 return specialTypeProps , b .getDuration ()
188+ case quantity :
189+ specialTypeProps .Type = "string"
190+ return specialTypeProps , b .getQuantity ()
181191 case meta , unstructured , rawExtension :
182192 specialTypeProps .Type = "object"
183193 return specialTypeProps , b .objSchema ()
0 commit comments