I wanted to see if we can get all the Endpoints with HttpMethods for a Swagger Spec from the swagger.json.
Swagger Parser provides a way of reading a swagger.json file into Java POJOs.
You need to include the depenceny in your pom.xml as follows
And then you can parse the file using:
To get all endpoints:
and the a available HttpMethods on these endpoints:
Code can be found on GIT
References