That's cool, Even I am looking to implement something on the same lines. May i request you to share your code snippet?
Regards, Sukrut On Monday, 19 December 2016 17:04:29 UTC+5:30, Denis Sukhoroslov wrote: > > Well, I was able to generate resource definitions dynamically using > io.swagger.models.Swagger API from my ReaderListener.afterScan() method. > But it seems to work properly only once: before the first swagger.json file > generation. If I change my resources several times in a session, the > ReaderListener.before/afterScan methods are invoked on every reload. But > the resulting swagger.json file does not change and contains resource > definitiions produced on the first scan only. It looks like Swagger caches > the definitions (or, the whole json/yaml generated content ?) somewhere. Is > there any method to clean the cache somehow and force Swagger to > re-generate resource definitions from very beginning? > > Thanks, Denis. > > > On Saturday, December 3, 2016 at 2:46:59 PM UTC+3, Denis Sukhoroslov wrote: >> >> Hi, >> >> I have several static REST resources implemented with Jersey 2.23.x. >> Their implementation classes are annotated with Swagger @Api annotations >> and they're proprly exposed in swagger.json. I also have a number of >> dynamically generated REST resources created via Jersey Resource.Builder >> API. How can I register them with Swagger? >> I'm implementing ReaderListener interface and want to register my dynamic >> REST resources in its afterScan method via swagger.addDefinition() API. Is >> it the right way to go? If yes, how can I build Model to register it with >> Swagger properly? >> >> Thanks, Denis. >> > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.