blob: 28032993071f7598c20010c771d2801235342a9c [file] [log] [blame]
== Camel OpenApi cdi Example
=== Introduction
This is an example that uses the rest-dsl to define a rest services
which provides three operations
* GET user/{id} - Find user by id
* PUT user - Updates or create a user
* GET user/findAll - Find all users
=== Build
You will need to compile this example first:
----
$ mvn compile
----
=== Run
To run the example type
----
$ mvn camel:run
----
The rest service can be accessed from http://localhost:8080/user:
----
$ curl http://localhost:8080/user
----
For example, to get a user with id 123 call http://localhost:8080/user/123:
----
$ curl http://localhost:8080/user/123
----
The rest services provides OpenApi API in json or yaml format which can
be accessed from http://localhost:8080/api-doc:
----
$ curl -H "Accept: application/json" http://localhost:8080/api-doc
$ curl -H "Accept: application/yaml" http://localhost:8080/api-doc
----
To stop the example hit ctrl+c
=== Help and contributions
If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/community/support/[let us know].
We also love contributors, so
https://camel.apache.org/community/contributing/[get involved] :-)
The Camel riders!