1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-01 23:36:58 +00:00

Validate subtypes in create/update

This commit is contained in:
Darren Shepherd
2018-01-17 16:33:05 -07:00
parent 9e6ea56442
commit 942bde06d7
3 changed files with 13 additions and 8 deletions

View File

@@ -23,11 +23,5 @@ func ParseAndValidateBody(apiContext *types.APIContext, create bool) (map[string
return nil, err
}
if apiContext.Schema.Validator != nil {
if err := apiContext.Schema.Validator(apiContext, data); err != nil {
return nil, err
}
}
return data, nil
}