{"push_id":2439626492,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"eca353ba277ba7bf3cd3f0ca0c33f16ab0475929","before":"717165378d132ef174e33af9cb2029f879584b54","commits":[{"sha":"eca353ba277ba7bf3cd3f0ca0c33f16ab0475929","author":{"name":"Harsha Ramesh","email":"61614df90c8c5c7fea836d93c7e9ce926431c57f@users.noreply.github.com"},"message":"SWARM-1667: Swarm swagger module does not generate swagger.json (#844)\n\nMotivation\r\n----------\r\n1. The spec states that if there is a custom application subclass that returns non-empty collections for either getClasses() or getSingletons() then the framework should only include those entities and nothing else.\r\n2. The way the Swagger framework has been *leveraged* is by including its resources (ApiListingResource, SwaggerSerializers) to the list of classes being returned (either explicitly or implicitly).\r\n3. The Swagger fraction adds these resources to the list of classes available to the archive so that an implicit scan will load them.\r\n\r\n4. Incidentally, JAX-RS allows for CDI within the JAX-RS resources / application-sub-classes.\r\n5. If CDI fraction has been enabled, then the framework introduces the application-sub-class as a *bean*.\r\n\r\nIf it is a bean .. then we can add an interceptor ... by plugging in as an extension and observing ProcessAnnotatedType events. We can potentially update the list of classes being returned by this bean (if either of the base target methods return a non-empty collection). And voila .. Swagger definitions start working!\r\n\r\nModifications\r\n-------------\r\n1. Implemented a CDI extension within the Swagger fraction.\r\n2. Defined an InterceptorBinding & Interceptor.\r\n3. The extension scans for classes which are sub-types of javax.ws.rs.core.Application\r\n4. These AnnotatedTypes (associated with types identified above) are updated to include a custom InterceptorBinding.\r\n5. The associated Interceptor checks if the application-sub-class returns resources / singletons explicitly or not. If it does, then the interceptor ensures that the Swagger resources are included.\r\n\r\nResult\r\n------\r\nUpdated the test cases to verify different scenarios. The build executes properly.","distinct":true,"url":"https://api.github.com/repos/wildfly-swarm/wildfly-swarm/commits/eca353ba277ba7bf3cd3f0ca0c33f16ab0475929"}]}
{"actor":{"display_login":"kenfinnigan"}}