Skip to content

Commit 29f061e

Browse files
author
Alexander Zielenski
committed
fix few ignored errors in gnsotic conversion
1 parent 9df8c88 commit 29f061e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/validation/spec/gnostic.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ func (k *Schema) FromGnostic(g *openapi_v2.Schema) (ok bool, err error) {
12531253
for _, v := range g.Items.GetSchema() {
12541254
schema := Schema{}
12551255
if nok, err := schema.FromGnostic(v); err != nil {
1256-
return ok,nil
1256+
return false, err
12571257
} else {
12581258
ok = ok && nok
12591259
}
@@ -1349,7 +1349,7 @@ func (k *Schema) FromGnosticSchemaItem(g *openapi_v2.SchemaItem) (ok bool, err e
13491349
schema := p.Schema
13501350

13511351
if nok,err := k.FromGnostic(schema); err != nil {
1352-
return ok,nil
1352+
return false, err
13531353
} else {
13541354
ok = ok && nok
13551355
}
@@ -1515,7 +1515,7 @@ func (k *Tag) FromGnostic(g *openapi_v2.Tag) (ok bool, err error) {
15151515
ok = true
15161516

15171517
if nok,err := k.TagProps.FromGnostic(g); err != nil {
1518-
return ok,nil
1518+
return false,err
15191519
} else {
15201520
ok = ok && nok
15211521
}

0 commit comments

Comments
 (0)