Open ayushr2 opened 4 years ago
Currently, there is a requirement that the servlet-class has to be either com.google.api.server.spi.SystemServiceServlet or com.google.api.server.spi.EndpointsServlet for the openAPI doc generation tool to generate docs for the endpoints servlet.
servlet-class
com.google.api.server.spi.SystemServiceServlet
com.google.api.server.spi.EndpointsServlet
Code Reference: https://github.com/cloudendpoints/endpoints-java/blob/39b73744c9ee4e39e94d6d11638ba34810e5de07/endpoints-framework-tools/src/main/java/com/google/api/server/spi/tools/WebXml.java#L53-L57
However in some usage cases we want to extend EndpointsServlet with a custom Endpoints Servlet which can handle some middleware-esque work. In that case our servlet-class will be neither of the above but will have inherited one of them. For example, https://github.com/TranDuongTu/tduhack-dsa/blob/master/src/main/webapp/WEB-INF/web.xml#L22-L29
EndpointsServlet
This is not my project but the author is doing something similar to what I am doing.
Currently, there is a requirement that the
servlet-class
has to be eithercom.google.api.server.spi.SystemServiceServlet
orcom.google.api.server.spi.EndpointsServlet
for the openAPI doc generation tool to generate docs for the endpoints servlet.Code Reference: https://github.com/cloudendpoints/endpoints-java/blob/39b73744c9ee4e39e94d6d11638ba34810e5de07/endpoints-framework-tools/src/main/java/com/google/api/server/spi/tools/WebXml.java#L53-L57
However in some usage cases we want to extend
EndpointsServlet
with a custom Endpoints Servlet which can handle some middleware-esque work. In that case ourservlet-class
will be neither of the above but will have inherited one of them. For example, https://github.com/TranDuongTu/tduhack-dsa/blob/master/src/main/webapp/WEB-INF/web.xml#L22-L29This is not my project but the author is doing something similar to what I am doing.