Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
(:~
: TESTMODULE for OpenAPI from RESTXQ.
: This is number one.
: :)
xquery version "3.1";
module namespace openapi-test-simple="https://lab.sub.uni-goettingen.de/restxqopenapi/test1";
declare namespace rest = "http://exquery.org/ns/restxq";
declare namespace test="http://exist-db.org/xquery/xqsuite";
(:~
: Simple GET Method Test for OpenAPI
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:GET
%rest:path("/openapi-test/simple/get")
function openapi-test-simple:get()
as element(test) {
<test>
<parameters n="0"/>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple but deprecated GET Method Test for OpenAPI
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
: @deprecated
:)
declare
%rest:GET
%rest:path("/openapi-test/simple/get-deprecated")
function openapi-test-simple:get-deprecated()
as element(test) {
<test>
<deprecated/>
<parameters n="0"/>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple PUT Method Test for OpenAPI
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:PUT
%rest:path("/openapi-test/simple/put")
function openapi-test-simple:put()
as element(test) {
<test>
<parameters n="0"/>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple DELETE Method Test for OpenAPI
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:DELETE
%rest:path("/openapi-test/simple/del")
function openapi-test-simple:del()
as element(test) {
<test>
<parameters n="0"/>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple DELETE Method Test for OpenAPI
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:POST
%rest:path("/openapi-test/simple/post")
function openapi-test-simple:post()
as element(test) {
<test>
<parameters n="0"/>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple HEAD Method Test for OpenAPI
: @return empty as defined by HTTP
: @see http://example.com/documentation/about/this
:)
declare
%rest:HEAD
%rest:path("/openapi-test/simple/head")
function openapi-test-simple:head()
as empty-sequence() {()};