westfieldlabs / apivore

Tests your rails API against its Swagger description of end-points, models, and query parameters.
Apache License 2.0
213 stars 66 forks source link

Unknown/unsupported Swagger version to validate against: #107

Open aegixx opened 7 years ago

aegixx commented 7 years ago

Doesn't seem to be picking up the Swagger version correctly (notice no version is reported).

I get this even when loading https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/petstore-minimal.json

     Failure/Error: subject { Apivore::SwaggerChecker.instance_for('/swagger.json') }
     RuntimeError:
       Unknown/unsupported Swagger version to validate against:
aegixx commented 7 years ago

Related to #64 though I get the error also when loading https://github.com/westfieldlabs/apivore/blob/master/spec/data/01_sample2.0.json

Running apivore (1.6.2)

saneshark commented 5 years ago

Are you changing the default rspec host used for requests from "www.example.com" to something else? This is the only change I've made and I'm having this issue. I think it must be a bug in apivore, it should support changing the host.