0

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.

1 Answers1

0

You can't do it without providing swagger a way to generate its JSON. There are 2 options for you:

  1. Use swagger annotations. (JAX-RS native ones are supported to reduce duplication, but you can do everything just with Swagger ones)
  2. 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