davsclaus opened a new pull request, #84: URL: https://github.com/apache/camel-jbang-examples/pull/84
Rung 7 of the ladder from CAMEL-24808: contracts and security, under `contracts/`. - `openapi-server` (rewritten, contract first): `stock-api.json` defines `listStock`, `getStock` and `reserveStock` with schemas and status codes. The REST DSL serves the contract with `clientRequestValidation`, `/openapi` serves the document, and each operation is a `direct` route named after its `operationId`. A reservation without a body is a 400 from the contract check; one without `qty` is a 400 from `validate` in the route; short stock is a 409. The README says the base path and shows one call per status. - `openapi-client` (rewritten): reserves stock for every order line with `rest-openapi` by `operationId`, so the route never spells out the verb and path. The 409 for the cap that is out of stock is handled by an `onException` that logs the status and body. The README says it needs `openapi-server` running; the Citrus test starts that example itself, then the client. - `keycloak-security-rest` (moved from `security/`): the API now listens on 8081 because the Keycloak from `camel infra run keycloak` takes 8080, and the README uses the Camel CLI only for starting and stopping Keycloak. The realm, client and users are still created in the console as the README walks through; no Citrus test for this one (`hasCitrusTests: false`). Both openapi tests pass locally. Catalog regenerated, CI matrix paths updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
