I don’t know of a solution but the resource
function accepts a map containing the callback functions. This handy when you want to implement a lot of similar shaped resources.
On the other hand, I think in your case, the resource implementation might stay the same for all schemas and the schema can be passed to the functions. Like this:
(defresource schema-resource [schema]
:handle-ok (fn [_] (str „This is the schema “ schema))
…)