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

Initialize swagger checker from swagger object directly #106

Closed ben-axnick closed 7 years ago

ben-axnick commented 7 years ago

Intended to address: https://github.com/westfieldlabs/apivore/issues/100

Background

Currently the SwaggerChecker initialize method has no flexibility about how Apivore::Swagger is constructed. By accepting a full object, the client gains the flexibility to fetch a swagger file however it wishes to, whether by file, remote HTTPS, or carrier pigeon.

Since README and specs revolve around .instance_for, whose signature remains unchanged, there are no other changes required.

What have I done?

ben-axnick commented 7 years ago

Closing because I don't want to see this in my PR list forever.

If you're interested in merging down the line, I'm happy to help make any changes you feel need to be made.

philsturgeon commented 6 years ago

Wish I saw this before making #118. If there is interest from the maintainers about that PR I'll pull this in and tweak it a little. I'm unhappy with the two-different places to check if JSON/YAML.

ben-axnick commented 6 years ago

Yeah, I had closed owing to the fact that it seemed like PRs weren't being handled or looked into at all by the maintainers, hopefully your PR meets with greater success.

philsturgeon commented 6 years ago

Thank you, but I just leave mine floating around like dingleberries!