Closed abhisheklakra007 closed 6 years ago
Moreover is swagger-annotation
included in swagger-core
.
You'd have to use version 1.5.X for it. There's no formal documentation, but you can follow the sample for guidance - https://github.com/swagger-api/swagger-samples/tree/master/java/java-servlet.
As per the project README, I should be using 2.X because my project is written in Java8, right ?
No, you can use 1.5 with Java 8.
Is there a way to use swagger-core2 with Spring MVC without depending on any library (such as springfox)? If I couldn't use swagger-core2 just like it was being used for servlets, but annotating spring MVC methods, that could work for me. I don't want any spring MVC integration, I just want my openapi spec to be generated out of the annotations.
@renannprado depending on swagger-core is depending on a library. Springfox provides a way to read those annotations in the context of Spring MVC which we don't provide in swagger-core. You can theoretically write your own Reader based on swagger-core, but you're better off using Sprintfox.
@webron rephrasing: I'd to depend on swagger-core/swagger-annotations alone, without depending on speingfox while it doesn't have support for swagger-core2
Same answer applies. swagger-core does not support Spring-based REST frameworks. You'll need to implement your own Reader to do that work, and that would prove very time consuming.
Can somebody add some reference to how can I integrate swagger ui in java pure servlet without Jax rs or any other framework.
How can I use it for Servlets that isn't JAX-RS or any popular framework like RESTEasy ?
This link is broken or it doesn't redirect to the right resource. https://github.com/wordnik/swagger-core/wiki/Servlet-Quickstart
This is an un answered stackoverflow question