pub struct SqlRoute {
pub metadata: Value,
pub http: HttpAnnotations,
pub param_locations: BTreeMap<String, HttpParamBinding>,
pub default_status: u16,
pub body_bundle_name: String,
pub operation_id: String,
pub handler_name: String,
}Expand description
One spikard route plus the SQL command and HTTP semantics needed to wire it up. Returned as a single value so callers don’t lose the join between the route’s identity (path/method/handler name) and the query metadata that produced it.
Fields§
§metadata: ValueRouteMetadata shape spikard-core consumes. Stored as JSON to avoid a
hard dep on spikard-core from spikard-codegen; callers (the CLI)
deserialize into the concrete type at the boundary.
http: HttpAnnotationsHTTP semantics that built the route — preserved so the OpenAPI emitter
and sidecar builder don’t have to re-parse query.custom.
param_locations: BTreeMap<String, HttpParamBinding>Mapping from SQL param name to its HTTP source. Combines explicit
@http_param overrides with the inference rules in bin_param_locations.
default_status: u16Status code chosen for the default response (from @http_status or
derived from the SQL command).
body_bundle_name: StringBundle name for the body object when multiple body params exist.
operation_id: Stringoperation_id used in OpenAPI (PascalCase, taken from @name).
handler_name: StringHandler name in generated code (snake_case, handle_<name>).