Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Support Custom Servlet for OpenAPI Doc generation #187

Open
ayushr2 opened this issue Jun 1, 2020 · 0 comments
Open

Support Custom Servlet for OpenAPI Doc generation #187

ayushr2 opened this issue Jun 1, 2020 · 0 comments

Comments

@ayushr2
Copy link

ayushr2 commented Jun 1, 2020

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.

Code Reference:

String findService = "/web-app/servlet" + "["
+ "servlet-class = 'com.google.api.server.spi.SystemServiceServlet'"
+ " or "
+ "servlet-class = '" + EndpointsServlet.class.getName() + "'"
+ "]/init-param[param-name = 'services']/param-value/text()";

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

This is not my project but the author is doing something similar to what I am doing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant