Each scenario shows an input, what skeld does with it, the code that causes it, and what it does not guarantee. They are illustrations checked against the documentation; nothing is sent anywhere.
Requests
Will this request reach your handler?
A short string reaches the handler.
Incoming JSON
{ "name": "polar" }
✓
Request arrivesPOST /projects
A JSON body enters the route.
✓
Validate inputstring · maxLength: 24
“polar” is a string with 5 characters, within the 24-character limit.
✓
Route handlercreateProject(name)
Called with the validated name.
Response body201 · The handler runs.
{ "name": "polar" }
201 Created · application/json
“polar” is a string with 5 characters, within the 24-character limit.
The body schema is checked before the normal route handler receives it. A required string must be present, have the right type and satisfy its declared bounds.
What this does not guarantee
Validation checks data, not identity or permission. Early onRequest hooks run before body validation and must treat input as untrusted.
200 · The extra field is omitted. The handler returned two fields. The response contract declares only name, so internalId is absent from the serialized body.
This applies to declared normal responses. Early raw hook replies and errors you write have different disclosure rules.
500 · The invalid body is not sent. The handler already ran, but its result violates the response contract. skeld sends the fixed internal error instead of that body.
A serialization failure cannot undo side effects the handler already performed.
200 · The secret value is sent. t.exposed(schema, reason) records an explicit disclosure decision. This response is allowed to contain the synthetic token.
Exposure does not authorize the recipient. The application must decide who may receive this value.
The log contains a marker, not the token. Passing the body through request.classified('body') carries its schema classification into the log projection.
This does not scan arbitrary messages for secrets. Raw strings and exposed values need separate care.
The query text is unchanged. Query text comes only from the literal parts of the sql tag. The value reaches the database as a parameter and is compared, not executed.
Two calls take SQL as a string: script(text) and query(text) through toPgPool. A request value joined into those is still injection.
Disconnected · No guaranteed response. The request signal lets your work react to the lost caller. In this example, the work checks that signal and stops.
Disconnecting does not roll back a write or forcibly terminate arbitrary application code.
The handler runs; no CORS read grant is sent. An unlisted origin receives no Access-Control-Allow-Origin header. That controls browser reading, not application authorization.
CORS does not authenticate callers. POST, PUT, PATCH and DELETE also face the separate cross-site mutation policy.
Generation refused · INVALID_SCHEMA The response would send a field declared secret, and nothing marks it as exposed. The call throws and its location names the route.
The document describes the contract, not the running service, and it publishes the data class of each field.
Document returned, with a diagnostic. The bound is written as x-skeld-maxLengthUtf16 and never as maxLength, and a UTF16_LENGTH diagnostic gives its location.
A tool that ignores the extensions validates less than core does. It never validates more.