swagger with simple servlet

27 views
Skip to first unread message

2sb...@gmail.com

unread,
Mar 13, 2018, 5:36:20 PM3/13/18
to Swagger
I have a Servlet with doGet method. It takes param type and based on the type I have different responses.

Can someone suggest the annotation I should use in doGet


switch (type) {
          case A:
            jsonString = A.class Json
            break;
          case B:
            jsonString = B.class Json
            break;
and so on..


There are approx 20-25 types


I would also appreciate if someone points me to the web.xml and pom.xml to generate the api for a simple servlet like this.

Reply all
Reply to author
Forward
0 new messages