Skip to content

Commit

Permalink
cmd/validate: more expressive errors (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored Feb 13, 2023
1 parent ecb06bc commit 28d8a4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func main() {

doc, err := loader.LoadFromFile(filename)
if err != nil {
log.Fatal(err)
log.Fatalln("Loading error:", err)
}

var opts []openapi3.ValidationOption
Expand All @@ -74,7 +74,7 @@ func main() {
}

if err = doc.Validate(loader.Context, opts...); err != nil {
log.Fatal(err)
log.Fatalln("Validation error:", err)
}

case vd.Swagger == "2" || strings.HasPrefix(vd.Swagger, "2."):
Expand All @@ -93,7 +93,7 @@ func main() {

var doc openapi2.T
if err := yaml.Unmarshal(data, &doc); err != nil {
log.Fatal(err)
log.Fatalln("Loading error:", err)
}

default:
Expand Down

0 comments on commit 28d8a4e

Please sign in to comment.