category
http_router_parameters
Declarative router companion category that reuses http_parameters declarations for request extraction and OpenAPI metadata generation.
logtalk_load(http_parameters(loader))static
Route declarations: Importing objects define parameter declarations per route using
route_parameter_declarations/2.Handler helper: Route handlers can call
route_parameters/2on the routed request to extract typed values using the matched route declarations.OpenAPI metadata: The category generates route metadata for query and path parameters, form request bodies, and a default
400 Bad Requestresponse descriptor from the same declarations. Importing objects can extend or override that metadata usingroute_parameter_extra_metadata/2or by overridingroute_metadata/2and delegating with^^route_metadata/2.
Public predicates
route_parameters/2
Extracts typed parameters for the route identified by the routed request route/1 annotation.
staticroute_parameters(Request,Parameters)route_parameters(+compound,-list(compound)) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)Request does not contain a route annotation:domain_error(http_routed_request,Request)domain_error(http_parameter_declaration,Declaration)domain_error(http_parameter_declaration(Name,path),not_in_route_path(RouteId))domain_error(http_parameter_declaration(Name,path),incompatible_route_path_type(Type,PathTemplateType))error(http_parameter_validation(Errors),Context)Protected predicates
route_parameter_declarations/2
Optional hook predicate that returns the http_parameters declaration list for a route identifier.
staticroute_parameter_declarations(RouteId,Declarations)route_parameter_declarations(?atom,?list(compound)) - zero_or_oneroute_parameter_request_body_description/2
Optional hook predicate that customizes the generated OpenAPI request-body description for form parameter declarations.
staticroute_parameter_request_body_description(RouteId,Description)route_parameter_request_body_description(?atom,?atom) - zero_or_oneroute_parameter_extra_metadata/2
Optional hook predicate that returns additional route metadata terms to merge with the metadata generated from parameter declarations.
staticroute_parameter_extra_metadata(RouteId,Metadata)route_parameter_extra_metadata(?atom,?list(compound)) - zero_or_onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)