civisanalytics / swagger-diff

Utility for comparing two Swagger specifications.
BSD 3-Clause "New" or "Revised" License
265 stars 32 forks source link

Fixing parsing of header and formData parameters #8

Closed jeffreyc closed 8 years ago

jeffreyc commented 8 years ago

@gburt please review?

The initial logic was incorrect, assuming all in values other than "query" and "path" were schema references. This broke "header" and "formData" parameters, by assuming they were references (they were completely dropped on the floor). Fixing the conditional to only treat "body" parameters as references.

Fixes #6.

gburt commented 8 years ago

LGTM. Do we ensure that input params don't change "in", eg from 'query' to 'header'?

jeffreyc commented 8 years ago

Do we ensure that input params don't change "in", eg from 'query' to 'header'?

We don't. It should be pretty easy to add, though (change (type: #{param.type}) to (in: #{param.in}, type: #{param.type})). I'll create a PR.