Forum Discussion

rajrahul9939's avatar
rajrahul9939
Occasional Contributor
5 years ago

access swagger document for particular api

Hi team,

Is it possible to access the documents generated by swagger inside the spring boot app, eg;

I have four APIs in an application

GET /api/read-api

PATCH /api/update-api

DELETE /api/delete-api

POST /api/create-api

and I have swagger configured in the application.

I have another class in the same project where I wanted to access the document for a particular input URL

public class SwaggerDocument{

    Map<String, Document>getDocument(String url){

       //I wanted to search generated document for input url

    }

}

Any help would be highly appreciated. 

 

Thank you