Hi, I suspect the issue is caused by the fact that your resource classes are located in different packages. Swagger's BeanConfig class accepts the package name for resources to scan and by default it is taken from the configured service beans (the first one available). If this is the case, there are at least two possible solutions here: - move all your service beans under the same package, keeping different JARs deployment model - manually set the package name by calling Swagger2Feature's setResourcePackage
Hope it helps! Thanks. Andriy On Wed, Jan 6, 2016 at 1:23 PM, vshar <[email protected]> wrote: > Hi, > > I have configured Swagger2Feature in my Restful web service. Swagger > feature > was working fine earlier and was showing all the APIs but I migrated one of > the APIs to an separate JAR file after which Swagger UI only shows this > migrated API. All Other APIs are up and running. I can hit them directly > but > Swagger UI shows none of them. > > Service I created was "CacheInfoService". I migrated this service to a > separate JAR. This jar is used by multiple services which interface with a > distributed cache and can use this JAR to get common utilities etc. There > is > an XML in this JARs META-INF which contains bean definition for this API > "CacheInfoService". > > If I put below import in my CXF config XML then I see only API defined in > this XML on Swagger UI (Other APIs are up and running. I am able to get a > response but Swagger doesn't show them). If I comment this import then this > API is not published and I can see all other APIs in Swagger UI. > <import resource="classpath:/META-INF/common/cache-endpoints.xml" /> > > I am unable to guess what could be wrong here hence thought of asking you > experts. > > Regards, > Vinay Sharma > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Swagger2Feature-missing-APIs-tp5764448.html > Sent from the cxf-dev mailing list archive at Nabble.com. >
