mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Added latest and greatest schema for correct OAS3.1 validation
When updating vacuum, OAS 3.1 specs were not validated correctly.
This commit is contained in:
@@ -88,7 +88,12 @@ func ExtractSpecInfo(spec []byte) (*SpecInfo, error) {
|
||||
// run in a separate thread, don't block.
|
||||
|
||||
if spec.SpecType == utils.OpenApi3 {
|
||||
spec.APISchema = OpenAPI3SchemaData
|
||||
switch spec.Version {
|
||||
case "3.0.0", "3.0.1":
|
||||
spec.APISchema = OpenAPI3SchemaData
|
||||
case "3.1.0":
|
||||
spec.APISchema = OpenAPI31SchemaData
|
||||
}
|
||||
}
|
||||
if spec.SpecType == utils.OpenApi2 {
|
||||
spec.APISchema = OpenAPI2SchemaData
|
||||
|
||||
Reference in New Issue
Block a user