Path: redb/redb.Templates/templates/route-xml/redb-route-rest/.template.config/agents-scenario.md Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Templates/templates/route-xml/redb-route-rest/.template.config/agents-scenario.md ---- An HTTP JSON API (`redb.Route.Http`), `routes/api.route.xml`: `` with `GET /api/hello/{name}` and `POST /api/orders`. The POST goes to `direct://modulectx-order-in`, which converts the body to text (``, the HTTP body arrives as bytes), checks it against `resources/order.schema.json` and answers 202. `onException` turns a `redb.Route.Validation.ValidationException` into 400. Facts to keep: `port` on `` takes a number, not a `{{key}}`; the status code is the header `redbHttp.ResponseCode`; path parameters arrive as `header.`, query parameters as `header.query.`; the OpenAPI document is served at `/api/openapi.json`. Usually changed: more verbs under ``, the schema in `resources/`, sign-in with `inboundAuth`. `routes/ApiRoute.cs` is the same API in C# with the REST DSL (`this.Rest("/api/cs", ...)`, same port, ids `cs-...`): the schema is the same file compiled in as `EmbeddedResource` (`order.schema.json`) and passed to `ValidateJsonSchema` as text.