Claus Ibsen created CAMEL-25765:
-----------------------------------
Summary: camel-jbang-examples - contracts/rest-code-first: the
REST DSL with JSON binding to a Java record and a generated API description
Key: CAMEL-25765
URL: https://issues.apache.org/jira/browse/CAMEL-25765
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.24.0
The contracts rung of camel-jbang-examples shows the contract-first REST DSL
(openapi-server, openapi-client), but not the code-first REST DSL, which most
Camel REST applications use.
A new example, contracts/rest-code-first, shows it with the web shop orders:
* GET /orders and GET /orders/\{id\} answer the orders as JSON through
bindingMode json, with 404 and a JSON error for an unknown id,
* POST /orders binds the JSON of a new order to a Java record (type
camel.example.Order) and answers 201, or 400 without lines,
* the API description generated from the operations is served at /openapi
(apiContextPath).
It comes with a Citrus YAML test that calls each operation, and it is also a
new task for the AI benchmark. It is placed first in the contracts group,
before the contract-first examples.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)