mirror of
https://github.com/rancher/norman.git
synced 2025-09-02 07:44:51 +00:00
Add subContext data to validation
This commit is contained in:
@@ -12,6 +12,15 @@ func ParseAndValidateBody(apiContext *types.APIContext, create bool) (map[string
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if create {
|
||||
for key, value := range apiContext.SubContextAttributeProvider.Create(apiContext, apiContext.Schema) {
|
||||
if data == nil {
|
||||
data = map[string]interface{}{}
|
||||
}
|
||||
data[key] = value
|
||||
}
|
||||
}
|
||||
|
||||
b := builder.NewBuilder(apiContext)
|
||||
|
||||
op := builder.Create
|
||||
|
Reference in New Issue
Block a user