mirror of https://gitee.com/bigwinds/arangodb
Doc - fix examples (#4579)
This commit is contained in:
parent
0e0b467a45
commit
139aca6967
|
@ -2,7 +2,7 @@
|
|||
@startDocuBlock JSF_get_api_aqlfunction
|
||||
@brief gets all reqistered AQL user functions
|
||||
|
||||
@RESTHEADER{GET /_api/aqlfunction, Return registered AQL user functions under 'result'}
|
||||
@RESTHEADER{GET /_api/aqlfunction, Return registered AQL user functions}
|
||||
|
||||
@RESTQUERYPARAMETERS
|
||||
|
||||
|
@ -61,7 +61,7 @@ a descriptive error message
|
|||
@EXAMPLES
|
||||
|
||||
@EXAMPLE_ARANGOSH_RUN{RestAqlfunctionsGetAll}
|
||||
var url = "/_api/aqlfunction";
|
||||
var url = "/_api/aqlfunction/test";
|
||||
|
||||
var response = logCurlRequest('GET', url);
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction <<EOF
|
||||
{
|
||||
<span class="hljs-string">"name"</span> : <span class="hljs-string">"myfunctions::temperature::celsiustofahrenheit"</span>,
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-string">"function (celsius) { return celsius * 1.8 + 32; }"</span>
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-string">"function (celsius) { return celsius * 1.8 + 32; }"</span>,
|
||||
<span class="hljs-string">"isDeterministic"</span> : <span class="hljs-literal">true</span>
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ content-type: application/json; charset=utf<span class="hljs-number">-8</span>
|
|||
x-content-type-options: nosniff
|
||||
|
||||
{
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-number">200</span>,
|
||||
<span class="hljs-string">"error"</span> : <span class="hljs-literal">false</span>,
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-number">200</span>
|
||||
<span class="hljs-string">"deletedCount"</span> : <span class="hljs-number">1</span>
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ x-content-type-options: nosniff
|
|||
|
||||
{
|
||||
<span class="hljs-string">"error"</span> : <span class="hljs-literal">true</span>,
|
||||
<span class="hljs-string">"errorMessage"</span> : <span class="hljs-string">"no AQL user function with name 'myfunction::x::y' found"</span>,
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-number">404</span>,
|
||||
<span class="hljs-string">"errorNum"</span> : <span class="hljs-number">1582</span>,
|
||||
<span class="hljs-string">"errorMessage"</span> : <span class="hljs-string">"user function '%s()' not found"</span>
|
||||
<span class="hljs-string">"errorNum"</span> : <span class="hljs-number">1582</span>
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
shell> curl --dump - http://localhost:8529/_api/aqlfunction
|
||||
shell> curl --dump - http://localhost:8529/_api/aqlfunction/test
|
||||
|
||||
HTTP/<span class="hljs-number">1.1</span> <span class="hljs-number">200</span> OK
|
||||
content-type: application/json; charset=utf<span class="hljs-number">-8</span>
|
||||
x-content-type-options: nosniff
|
||||
|
||||
[
|
||||
{
|
||||
<span class="hljs-string">"name"</span> : <span class="hljs-string">"myfunctions::temperature::celsiustofahrenheit"</span>,
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-string">"function (celsius) { return celsius * 1.8 + 32; }"</span>
|
||||
}
|
||||
]
|
||||
{
|
||||
<span class="hljs-string">"error"</span> : <span class="hljs-literal">false</span>,
|
||||
<span class="hljs-string">"code"</span> : <span class="hljs-number">200</span>,
|
||||
<span class="hljs-string">"result"</span> : [ ]
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue