Skip to content

Commit 2c68eee

Browse files
committed
[cozystack-api] Fix updaing lists
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 699d38d commit 2c68eee

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎pkg/cmd/server/start.go‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ func (o *AppsServerOptions) Config() (*apiserver.Config, error) {
236236
},
237237
}
238238

239+
// make `.spec` schemaless so any keys are accepted
240+
if specProp, ok := newDef.Properties["spec"]; ok {
241+
specProp.AdditionalProperties = &spec.SchemaOrBool{
242+
Allows: true,
243+
Schema: &spec.Schema{},
244+
}
245+
newDef.Properties["spec"] = specProp
246+
}
247+
239248
// 3. Save the new resource definition under the correct name
240249
defs[resourceName] = *newDef
241250
klog.V(6).Infof("PostProcessSpec: Added OpenAPI definition for %s\n", resourceName)

0 commit comments

Comments
 (0)