Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
Commit 5caf6d9a authored by Mathias Goebel's avatar Mathias Goebel
Browse files

Merge tag 'v1.1.0' into develop

add header and cookie parameter
refine tests
keep a changelog
parents 96c4e455 4d9e5135
No related branches found
No related tags found
No related merge requests found
Pipeline #91059 passed
project.name=https://lab.sub.uni-goettingen.de/openapi4restxq-develop
project.version=1.0.3
project.version=1.1.0
project.title=OpenAPI for RESTXQ
project.abbrev=openapi-develop
project.processorversion=4.6.0
......
......@@ -25,6 +25,72 @@ as element(test) {
</test>
};
(:~
: Simple GET Method Test with HEADER parameter for OpenAPI
: @param $test A string added to the request header “x-test”
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:GET
%rest:path("/openapi-test/simple/get-header")
%rest:header-param("x-test", "{$test}")
function openapi-test-simple:get-header($test as xs:string*)
as element(test) {
<test>
<parameters n="1">
<header>{ $test }</header>
</parameters>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple GET Method Test with COOKIE parameter for OpenAPI
: @param $test A string added to the request header “x-test”
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:GET
%rest:path("/openapi-test/simple/get-cookie")
%rest:cookie-param("tasty_cookie", "{$test}")
function openapi-test-simple:get-cookie($test as xs:string*)
as element(test) {
<test>
<parameters n="1">
<cookie>{ $test }</cookie>
</parameters>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple GET Method Test with multiple parameter for OpenAPI
: @param $test A string added to the request header “x-test”
: @return xml fragment that describes request and response
: @see http://example.com/documentation/about/this
:)
declare
%rest:GET
%rest:path("/openapi-test/simple/get-multi")
%rest:query-param("getTest1", "{$getTest1}")
%rest:query-param("getTest2", "{$getTest2}")
%rest:cookie-param("tasty_cookie", "{$cookieTest}")
%rest:header-param("x-test", "{$headerTest}")
function openapi-test-simple:get-cookie($getTest1 as xs:string*, $getTest2 as xs:string*, $cookieTest as xs:string*, $headerTest as xs:string*)
as element(test) {
<test>
<parameters n="4">
<header>{ $headerTest }</header>
<cookie>{ $cookieTest }</cookie>
<get1>{ $getTest1 }</get1>
<get2>{ $getTest2 }</get2>
</parameters>
<response n="1" type="application/xml"/>
</test>
};
(:~
: Simple but deprecated GET Method Test for OpenAPI
......
......@@ -8,22 +8,26 @@
<type>application</type>
<target>openapi</target>
<changelog>
<change version="1.1.0">
<ul xmlns="http://www.w3.org/1999/xhtml">
<li class="feat">Features
<ul style="margin-left: 15px;">
<li>add a pareser for cookie and header parameter</li>
<li>refine test modules</li>
<li>update SPDX</li>
</ul>
</li>
</change>
<change version="1.0.0">
<ul xmlns="http://www.w3.org/1999/xhtml">
<li class="feat">Features
<ul>
<ul style="margin-left: 15px;">
<li>Prepares OpenAPI 3.0.2 documentation file (json)</li>
<li>Parse <a href="http://exquery.github.io/exquery/exquery-restxq-specification/restxq-1.0-specification.html">RESTXQ</a></li>
<li>Parse <a href="http://xqdoc.org/xqdoc_comments_doc.html">xqDocs</a></li>
<li>Parse <a href="http://xqdoc.org/xqdoc_comments_doc.html">xqDoc</a></li>
<li>Parse <a href="http://exist-db.org/exist/apps/doc/xqsuite.xml">test annotations</a></li>
</ul>
</li>
<li class="bugs">Bugfixes
<ul>
<li></li>
</ul>
</li>
</ul>
</change>
</changelog>
</meta>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment