Yelp / swagger_spec_validator

Other
104 stars 71 forks source link

Support File type #13

Closed dnephin closed 9 years ago

dnephin commented 9 years ago

https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#43-data-types

I don't see an easy way to do the extra assertions about being in params and type form. The warning comes right from the spec: https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#435-file

prat0318 commented 9 years ago

I am not sure why swagger-spec mentions it as a warning. In a correct 1.2 spec, declaring a model with the name File would mean using a $ref for the model. If File is assigned as a type, the only intent will be to use it as a multipart file param and not a model. Warning would make much more sense if checking the assignment of File on ref?

dnephin commented 9 years ago

The reason it gives is "[it] may lead to various conflicts with third party tools and SHOULD be avoided."

Not really clear

dnephin commented 9 years ago

I think I know how to resolve this TODO I added, going to try it out

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.85%) to 80.83% when pulling 75558c063851a2af42b7c57198716f0fbdaaf57f on dnephin:fix_errors_in_12 into cb467e4764941c726dae2e07c9ef28e74181d53d on Yelp:master.

dnephin commented 9 years ago

Fixed, and added a couple unit tests

coveralls commented 9 years ago

Coverage Status

Coverage increased (+1.07%) to 82.74% when pulling c8e63d5803c467d034d6bfb6456fc3e317b8da48 on dnephin:fix_errors_in_12 into 01f2602c8d13e6363790d228b0488b616275ec63 on Yelp:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+1.07%) to 82.74% when pulling c8e63d5803c467d034d6bfb6456fc3e317b8da48 on dnephin:fix_errors_in_12 into 01f2602c8d13e6363790d228b0488b616275ec63 on Yelp:master.