Do swagger-samples generate
swagger.json?
I'm guessing that the point of the swagger-samples example programs are to provide small REST implementations in which the swagger.json file is generated and you can view that using the SwaggerUI program. If not please tell me because I'm trying to learn how to annotate my JAX-RS based application and generate the OpenAPI spec so it can be viewed in the SwaggerUI.
I've run two examples: java-jersey2 and java-jersey-jaxrs.
Both compile and run fine (with Java 8). I use the command documented which is:
mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run
I open my browser to http://localhost:8002 and see the dialog box (see attached file) and that's it. I'm not sure where to go from there.
I've tried entering different values in the input fields, but the Explore link does nothing but refresh the page. I examined the javascript on the page to know this.
Separately, I've learned how the SwaggerUI works. I've also manually created a swagger.json file for one of the rest endpoints and
verified it works using SwaggerUI but haven't (yet) figured out how to
get the OpenAPI spec (aka swagger.json) file created from the
annotations, so I'm getting to understand the pieces.
So two questions:
(1) Do these samples generate a Swagger.json file? If so where is it (I searched and didn't find it).
(2) If not, what are the next steps to generate that swagger.json file so that I could point to it in a SwaggerUI instance I'm running.
Thanks,
Patrick