given a function commented like:
(:~
: return search results
: <hit>
: <entity>country</entity>
: <name>name</name>
: <url>...</url>
: </hit>
:)
declare
%rest:GET %rest:path("where4/api/search")
%restxq:query-param("q", "{$q}")
%output:method("json")
function search($q){
The wadl function [1] produces:
<wadl:resource path="/where4/api/search/">
<wadl:method name="GET">
<wadl:doc xmlns="http://www.w3.org/1999/xhtml">return search results
<hit xmlns="" xmlns="http://www.w3.org/1999/xhtml">
<entity xmlns="">country</entity>
<name xmlns="">name</name>
<url xmlns="">...</url>
</hit>
</wadl:doc>
<wadl:request>
<wadl:param name="q" style="query"/>
</wadl:request>
<wadl:response>
<wadl:representation mediaType="application/json"/>
</wadl:response>
</wadl:method>
</wadl:resource>
Regards