Closed botchniaque closed 8 years ago
Thank you for your feedback! It looks like this is an issue with swagger-rb
, the underlying library swagger-diff
uses to parse Swagger specifications. Unfortunately, we’re juggling a few different priorities at this time, and probably won’t get to this quickly. If you’re interested, we’d welcome a PR addressing this issue. It looks like there are two possible ways to approach this:
swagger-rb
and wait for them to fix it. However, swagger-rb
appears to be inactive, or possibly abandoned, so I don’t anticipate any issue being addressed quickly.ruby_swagger
looked to be a viable candidate that was under active development, though it's also pretty young, so may not be feature-complete yet. swagger_parser
was another candidate. It was less active, though also had no outstanding issues/PRs, so may just be stable. If you wanted to attempt replacing the Swagger parser, it would be worth investigating the current state of parsers, in case someone released a better candidate since I last looked.If you opt for 2, you may also want to file an issue with swagger-rb
so they’re aware and can address the underlying problem if and when they have time.
Either way, we’d be happy to review a PR, and appreciate the contribution!
When looking at #31, I discovered that swagger-rb
does implement support for $ref
, but does not include it in the response object. So adding another monkey patch to patch.rb and a new spec to specification_spec.rb is also an option here.
I just released Swagger::Diff 1.1.0. Among other improvements, it replaces the underlying parser, and should now support this Swagger specification, too. If you encounter any other problems, please let us know.
I have a swagger file containing
$ref
s to pre-defined responses.swagger-diff
fails with an error:My
resp-ref.yaml
file:When calling
swagger-diff resp-ref.yaml resp-ref.yaml
(I use same file for simplicity) Error I am getting: