Validate against OpenAPI schema (if available)

This commit is contained in:
Antoine Pelisse
2017-08-11 09:38:59 -07:00
parent 0ade03bc0f
commit b7b5457050
14 changed files with 37 additions and 18 deletions

View File

@@ -229,7 +229,7 @@ func (o *EditOptions) Run() error {
glog.V(4).Infof("User edited:\n%s", string(edited))
// Apply validation
schema, err := o.f.Validator(o.EnableValidation, o.SchemaCacheDir)
schema, err := o.f.Validator(o.EnableValidation, o.UseOpenAPI, o.SchemaCacheDir)
if err != nil {
return preservedFile(err, file, o.ErrOut)
}