hootsuite / sbt-swagger

SBT plugin for extracting Swagger & JAX-RS (jsr311) annotations from compiled classes into Swagger API models, which are then serialized to JSON for consumption with swagger-ui.
Other
27 stars 6 forks source link

Invalid swagger api version #14

Open ssong-van opened 8 years ago

ssong-van commented 8 years ago

The plugin generates JSON with invalid Swagger Spec version. "1.0", "1.1", "1.2" are valid values for "swaggerVersion".

This can be fixed in sbt.scala where "2.0" is used to initialize SwaggerConfig https://github.com/hootsuite/sbt-swagger/blob/master/src/main/scala/com/hootsuite/sbt/swagger/Sbt.scala#L49

Swagger Spec 1.2: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/1.2.md

EmergentOrder commented 8 years ago

Ran into the same issue. The output Swagger JSON fails validation. Tested using: http://online.swagger.io/validator/debug?url=YOURURL