Is it possible to generate swagger definition for legacy Java applications which do not follow REST based services? Note: I am able to generate swagger for applications with REST JAXRS and some other frameworks like spring. So the expectation is it possible to generate for an application which are not using any annotations. For example a web application which was developed using only html, jsp, servlets etc. In some places I have seen that swagger is specifically for REST services but just want to make sure is there a way to do for legacy applications.
Asked
Active
Viewed 228 times
0
-
Hi, welcome to SO. Please note that you need to share a piece of code you tried. – Prakash Palnati Nov 17 '17 at 05:53
1 Answers
0
You can't do it without providing swagger a way to generate its JSON. There are 2 options for you:
- Use swagger annotations. (JAX-RS native ones are supported to reduce duplication, but you can do everything just with Swagger ones)
- Generate swagger.json manually or write you own logic that will produce compatible JSON.
Swagger UI is just about visualizing JSON of expected format describing REST services.

Aleh Maksimovich
- 2,622
- 8
- 19
-
Thanks for your suggestions. This makes me to take proper decision. – Praveen DK Nov 20 '17 at 05:18