GetShopTV / swagger2

Swagger 2.0 data model.
http://hackage.haskell.org/package/swagger2
BSD 3-Clause "New" or "Revised" License
74 stars 59 forks source link

Apparently there is a type defaulting logic implemented in swagger tools that is not specified #131

Open loewenstein opened 7 years ago

loewenstein commented 7 years ago

Cannot parse https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json because it does not contain type attributes for definitions.

swagger-cli does successfully validate that same OpenAPI spec document though.

I have created an issue on the spec repo that this should be specified so that all tools are aligned. https://github.com/OAI/OpenAPI-Specification/issues/1388

Maybe we can come to correctly parsing swagger documents created with swagger tools even without waiting for the spec to explicitly state the defaulting logic.

loewenstein commented 7 years ago

According to the discussions on https://github.com/OAI/OpenAPI-Specification/issues/1388 we should probably allow definitions not to specify a 'type' attribute.