Open catshout opened 4 years ago
@catshout Snapahot version is not published to external repositories which you use in your Karaf instance.
try adding sonatype-oss repo to etc/org.ops4j.pax.url.mvn.cfg
or build project locally.
i build locally and feature is in local maven. Even then i getting
karaf@trun()> feature:repo-add mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
Adding feature url mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
Error executing command: Error resolving artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT: [Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in defaultlocal (file:/C:/Users/windows/.m2/repository/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in apache (http://repository.apache.org/content/groups/snapshots-group/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in sonatype.snapshots.deploy (https://oss.sonatype.org/content/repositories/snapshots/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in ops4j.sonatype.snapshots.deploy (https://oss.sonatype.org/content/repositories/ops4j-snapshots/), Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT in spring-ebr-repository (http://repository.springsource.com/maven/bundles/external/)] : mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
karaf@trun()> mvn:io.swagger/swagger-annotations/mvn:io.swagger/swagger-annotations/
@glakshmi23 @catshout It is my fault. This project was not uploaded to sonatype thus my earlier tip couldn't work. I am deploying the 3.0.0-SNAPSHOT (in its ancient form). The itest are failing on master thus you might need your own tweaks to get it running with recent Karaf/Talend ESB.
Finally I've installed in Karaf as described here .. https://cwiki.apache.org/confluence/display/CXF20DOC/OpenApiFeature#OpenApiFeature-EnablingSwaggerUIinOSGicontainer(Karaf)
Could someone point me out what the URL is and how to call with a swagger file from a deployed service?
Thanks in advance Gerald
@catshout there are two things to distinguish. CXF has native support for CXF but it works on service basis. This means that if you have two or three bundles publishing different endpoints you will have three different swagger descriptors generated.
This project aims generation of composite swagger descriptor out of all CXF/JAX-RS services deployed within Karaf. If you need this then you leave your CXF endpoints as-is and deploy this project. Swagger descriptor will be published at /services/swagger
(.json) for Talend ESB or /cxf/swagger
for plain Karaf.
The swagger-ui deployment can be arranged as needed. This project ships "ui" module which deploys javascript client at /swagger-ui/index.html
. You can of course use webjars, however then you need to make sure that they get processed properly.
Hi @splatch,
I tried to add the feature with
feature:repo-add mvn:org.code-house.swagger/features/3.0.0-SNAPSHOT/xml
and got
Could not find artifact org.code-house.swagger:features:xml:3.0.0-SNAPSHOT
Is there any other way to add the feature? Tx in advance.
Gerald