Initialize swagger checker from swagger object directly#106
Closed
ben-axnick wants to merge 1 commit intowestfieldlabs:masterfrom
Closed
Initialize swagger checker from swagger object directly#106ben-axnick wants to merge 1 commit intowestfieldlabs:masterfrom
ben-axnick wants to merge 1 commit intowestfieldlabs:masterfrom
Conversation
Currently the 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. The previous initalization routine has been moved to `.from_local_route`, and `.instance_for` has been updated to reflect that. Any client that previously used the initializer directly would need to be modified to call `.from_local_route` instead.
Author
|
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. |
|
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. |
Author
|
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. |
|
Thank you, but I just leave mine floating around like dingleberries!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intended to address: #100
Background
Currently the
SwaggerCheckerinitialize method has no flexibility about howApivore::Swaggeris 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?
.from_local_route, and.instance_forhas been updated to reflect that.Apivore::Swagger(or any object that accepts#validateand#each_response)