Swagger With Karaf Integration - swagger

I am trying to integrate Karaf with Swagger for Rest-API Documentation following the link :http://cxf.apache.org/docs/swagger2feature.html
I am ussing cxf 3.1.3. I am unable to find the swagger as a karaf feature.
i tried to resolve the swagger dependencies but unable to succeed.
Any Help?

There's a swagger 2.11 feature already configured at the servicemix repository, you can install it with the following steps:
feature:repo-add mvn:org.apache.servicemix.features/servicemix-features/7.0.1/xml/features
feature:install swagger-2.11

Related

Failed to execute goal org.wso2.maven:mi-container-config-mapper:5.2.18:config-mapper-parser in wso2 docker image

this is came from yesterday onwards, when i run the maven for docker project i am getting
Failed to execute goal org.wso2.maven:mi-container-config-mapper:5.2.35:config-mapper-parser (config-mapper-parser) on project ESBDockerExporter: Exception while parsing the deployment.toml file
this is the plug-in i added in docker pom.xml
There is a known issue that happening due to the new HTTPS template URL. So with the new URL HTTPS config, the older "mi-container-config-mapper" plugin has some issues.
So in order to correct this update the version in the k8s project pom file as below.
<artifactId>mi-container-config-mapper</artifactId>
<version>5.2.35</version>

How to fix java.lang.RuntimeException: missing swagger input or config?

I'm trying to generate java code from swagger.json using swagger-codegen-cli.jar but I get this exception:
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:763)
at io.swagger.codegen.cmd.Generate.run(Generate.java:299)
at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
The command I'm trying to run is the following:
java -jar swagger-codegen-cli.jar generate -i swagger.json -l java -c java-config.json -o api-client
You are using Swagger Codegen 2.x which does not support OpenAPI 3.0.
You need to use Swagger Codegen 3.x instead. You can download the latest 3.x CLI JAR from Maven Central:
https://mvnrepository.com/artifact/io.swagger.codegen.v3/swagger-codegen-cli
Here's a direct link to v. 3.0.20 CLI (the latest version as of the time of writing):
https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.20/swagger-codegen-cli-3.0.20.jar
Or if you prefer to build the codegen from the source code, version 3 is in the 3.0.0 branch:
https://github.com/swagger-api/swagger-codegen/tree/3.0.0

I'm using Workbench. what is Rest API Configuration?

I installed Workbench from jbpm-installer-full-7.1.0.Final.zip using ANT install.demo. Then i start it using ANT start.demo.
i import repository "https://github.com/kiegroup/jbpm-playground".
What is the configuration should i do to use rest api and start process?
i tried this but it faild "http://localhost:8080/kie-server/services/rest/server/containers/human-resources_1.0/processes/hiring/start". Thannks
you only need to build and deploy. you don't need to configure anything. once it is deployed.
check the documentation
{server}:{port}/kie-server/docs
so in your case,
localhost:8080/kie-server/docs

How to Install cxf:1.1.1 server in Grails 2.3.0

I tried to install the plugin for cxf server in order to expose some grails services as SOAP web services, according to Grails 2.3 the new plugin installation is:
compile ":cxf:1.1.1"
in plugins section of BuildConfig.groovy, however it does not work, I tried to expose a service and the annotations are not recognized, I am working with GGTS (Groovy Grails Tool Suite) and I can't see the plugin installed under the plugin section.
My environment is Grails 2.3, Java 7, Groovy 2.1
Has anybody tried this plugin using Grails 2.3.0 and stumbled upon this issue in GGTS?
In order for the annotations to be recognized you'll need to import the following libraries into the interface or service class you're using to expose the endpoint:
import javax.jws.WebService
import org.grails.cxf.utils.EndpointType
import org.grails.cxf.utils.GrailsCxfEndpoint
The plugin should show up in the plugins dir if you refresh the dependencies for the project.

Accessing logs for ant

I am trying to install a project from github using phpunit. The project uses composer to install the dependencies.
When I run ant to build the project, I get a simple error message, but I would like to access more complete logs of ant. Is it accessible ?
Best,
Mehdi
See:
http://ant.apache.org/manual/running.html
For example using:
-verbose, -v
is quite popular to see what ANT does and how it does resolve dependencies.
Sebastian

Resources