swagger-api / swagger-samples

Samples for the various Swagger projects under swagger-api
http://swagger.io
Apache License 2.0
538 stars 883 forks source link

Please make it clear which samples use OpenAPI 2 vs. 3 #201

Open davewichers opened 4 years ago

davewichers commented 4 years ago

Given the transition, and the fact that some methods went away in this update, can you update the code examples to clearly indicate whether the annotations used in the examples work with swagger-api 1.x vs 2.x (OpenAPI 2 vs 3)? It's very frustrating to look for an example, find one that is close, try it out, and find out it won't even compile because of this. Ideally, you'd have examples for both for each example, or upgrade all existing examples to use the new version (or something).

For example: https://github.com/swagger-api/swagger-samples/blob/master/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java - this uses the older swagger library not the new one that supports OpenAPI 3.