Skip to content

Commit

Permalink
cmd/validate: read v2 documents that dont mention swagger as well (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored Nov 26, 2023
1 parent a643c4c commit 6c9b4a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/validate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ func main() {
log.Fatalln("Validation error:", err)
}

case vd.Swagger == "2" || strings.HasPrefix(vd.Swagger, "2."):
case vd.OpenAPI == "2" || strings.HasPrefix(vd.OpenAPI, "2."),
vd.Swagger == "2" || strings.HasPrefix(vd.Swagger, "2."):
if *circular != defaultCircular {
log.Fatal("Flag --circular is only for OpenAPIv3")
}
Expand Down

0 comments on commit 6c9b4a8

Please sign in to comment.