How to automatically save generated /swagger.json into a local file
Hello,
I am new here.
I am using swagger core to generate my swagger specification files. I am also using swagger ui dist folder to access swagger ui. To view my swagger document with index.html, i have generated swagger.json using rest client, then copy the spec into a file named response.json then put that file into swagger ui dist folder. From there i can change the url in index.html into the path to the spec file. Each time i add swagger annotations on the resource classes, i build the project and a new swagger.json gets generated and i have change the contents of the response.json into my new swagger.json to view the new changes made.
Is there a way that after building my project, it will first hit the endpoint to generate swagger.json and save it as response.json in our swagger-ui folder?