1 Star 0 Fork 1

寒松/camel-spring-boot-examples2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.adoc 1.18 KB
一键复制 编辑 原始数据 按行查看 历史

Camel Rest OpenApi example

This example shows how to call a REST service defined using OpenApi specification with the help of Camel Rest OpenApi component.

The example is a standalong Spring Boot application that acts as a REST client, you can run simply by issuing:

$ mvn spring-boot:run

Or by packaging it and running it using java CLI:

$ mvn package
$ java -jar target/camel-example-spring-boot-rest-openapi-simple-*.jar

The example by default uses the PetStore demo hosted on swagger.io and invokes the logoutUser operation. You can make it call any API that you have OpenApi specification for and any operation with simple arguments, for instance this retrives a pet from the PetStore demo with ID 14:

$ java -jar target/camel-example-spring-boot-rest-openapi-*.jar \
        --openapi=https://petstore3.swagger.io/api/v3/openapi.json \
        --operation=getPetById \
        --petId=14

Help and contributions

If you hit any problem using Camel or have some feedback, then please let us know.

We also love contributors, so get involved :-)

The Camel riders!

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qqzahng/camel-spring-boot-examples2.git
git@gitee.com:qqzahng/camel-spring-boot-examples2.git
qqzahng
camel-spring-boot-examples2
camel-spring-boot-examples2
camel-3.4.x

搜索帮助