route
The route block binds an HTTP method and path pattern to an execution pipeline.
Request validation
The request block validates parameters across four coordinates: path, query, header, and body.
Automatic parameter coercion
Path and query inputs start as raw text, but hclapi coerces them into native Go types as soon as validation passes:
type = integer: Coerced to nativeint64.type = number: Coerced to nativefloat64.type = boolean: Coerced to nativebool.
Downstream SQL steps receive typed numbers rather than strings, avoiding type mismatch errors on strict databases like PostgreSQL.
Using reusable schemas
Reference a declared schema directly on the body: