conorroche / swagger-doclet

Apache License 2.0
69 stars 21 forks source link

Embedded Swagger UI Incompatible with generated json? #5

Open jmkao opened 8 years ago

jmkao commented 8 years ago

The embedded swagger UI reports an error:

{"schemaValidationMessages":[{"level":"error","message":"Deprecated Swagger version.  Please visit http://swagger.io for information on upgrading to Swagger 2.0\""}]}

When pointed at the service.json generated. However, from the changelog, it looks like Swagger-UI 2.1.0 was added recently, in version 1.1.1 (i am using 1.1.3) and did work at that time, so I'm not sure whether this is a bug or potential user error.

bedag-moo commented 7 years ago

The Swagger team has deprecated version 1.2 of the Swagger Specification, and urges everyone to upgrade though this validation error. The swagger-doclet does not yet support that version of the Swagger Specification (see #4).

In spite of this deprecation warning, all versions of the swagger tooling continue to understand the old specification version. In particular, the bundled swagger-ui is compatible with the generated json.

Larzenegger commented 6 years ago

It is possible to add validatorUrl: null to the index.html customization, which suppresses the validation remote call and deprecation error message.