We use Swagger to generate our API specification on our Java backend. The maven dependency used is
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey-jaxrs</artifactId>
<version>1.5.13</version>
</dependency>
We are looking to be able to pass some parameters to the /swagger.json endpoint, likely query parameters, that will modify the swagger.json that is generated and returned. The motivation for this is that we generate a few different API's all from the same server, and would like to be able to simply hit the /swagger.json endpoint with a query param specifying the API to generate the correct JSON, e.g. removing certain endpoints or changing certain authorizations, depending on the input.
I've stumbled onto the ReaderListener interface that would allow us to make the mods to the JSON; however, we need to be able to pass some input to this from the the cURL, e.g.
curl --location --request GET 'http://localhost:8080/swagger.json?key=value'
And get that <key,value> into the ReaderListener code, as an example possible solution.