How to suppress requestBody generation in OpenAPI spec using swagger-maven-plugin
I'm using the swagger-maven-plugin in a Java application with an old school servlet implementation. I'm trying to follow the examples here: https://github.com/swagger-api/swagger-samples/, but unfortunately this one: https://github.com/swagger-api/swagger-samples/blob/master/java/java-servlet/src/main/java/io/swagger/sample/servlet/SampleServlet.java which is the closest match, uses the 1.x version of swagger.core, not 2.x.
I found other examples that sort of work (see what I did below), except that it generates an almost 950 line requestBody element in the openapi.yaml doc for this endpoint. Why does it do that? Is there a way to suppress that? Below is the maven import and the code snippet:
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.1.2</version>
The code with annotations is:
@Path("/Test00020")
public class Test00020 extends HttpServlet {
@Override
@GET
@Operation (
summary = "Ask something, get something back.",
parameters = { @Parameter(in = ParameterIn.QUERY, name="TestParam00020", required = true ) }
)
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ...
Thanks, Dave