Function psibase::serve_action_templates
source · pub fn serve_action_templates<Wrapper: Reflect>(
request: &HttpRequest
) -> Option<HttpReply>
Expand description
Handle /action_templates
request
If request
is a GET /action_templates
, then this returns a
JSON object containing a field for each action in Service
. The
field names match the action names. The field values are objects
with the action arguments, each containing sample data.
If request
doesn’t match the above, then this returns None
.
Wrapper
should be generated by #[psibase::service]
.