mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 04:20:11 +00:00
Tests were hanging, stopped JSON parsing channel use altogether
vacuum will need looking at for this later version.
This commit is contained in:
@@ -105,8 +105,7 @@ func ExtractSpecInfo(spec []byte) (*SpecInfo, error) {
|
||||
spec.SpecJSONBytes = &bytes
|
||||
spec.SpecJSON = &jsonSpec
|
||||
}
|
||||
spec.JsonParsingChannel <- true
|
||||
close(spec.JsonParsingChannel)
|
||||
close(spec.JsonParsingChannel) // this needs removing at some point
|
||||
}
|
||||
|
||||
// check for specific keys
|
||||
@@ -129,8 +128,6 @@ func ExtractSpecInfo(spec []byte) (*SpecInfo, error) {
|
||||
specVersion.SpecFormat = OAS3
|
||||
}
|
||||
|
||||
//return specVersion, nil
|
||||
|
||||
if openAPI2 != nil {
|
||||
specVersion.SpecType = utils.OpenApi2
|
||||
version, majorVersion, versionError := parseVersionTypeData(openAPI2.Value)
|
||||
@@ -172,10 +169,10 @@ func ExtractSpecInfo(spec []byte) (*SpecInfo, error) {
|
||||
if specVersion.SpecType == "" {
|
||||
// parse JSON
|
||||
parseJSON(spec, specVersion, &parsedSpec)
|
||||
|
||||
specVersion.Error = errors.New("spec type not supported by vacuum, sorry")
|
||||
return specVersion, specVersion.Error
|
||||
}
|
||||
|
||||
return specVersion, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user