Gitlab Community Edition Instance

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

Merge branch 'release/1.0.1'

parents 6a9afb27 cca43bbb
No related branches found
Tags v1.0.1
No related merge requests found
Pipeline #91007 passed
...@@ -11,6 +11,7 @@ build-develop: ...@@ -11,6 +11,7 @@ build-develop:
- tags - tags
stage: build stage: build
script: script:
- npm install
- ant test - ant test
artifacts: artifacts:
paths: paths:
...@@ -23,6 +24,7 @@ build-master: ...@@ -23,6 +24,7 @@ build-master:
stage: build stage: build
script: script:
- cp master.build.properties local.build.properties - cp master.build.properties local.build.properties
- npm install
- ant test - ant test
artifacts: artifacts:
paths: paths:
......
project.name=https://lab.sub.uni-goettingen.de/restxqopenapi-develop project.name=https://lab.sub.uni-goettingen.de/openapi4restxq-develop
project.version=1.0.0 project.version=1.0.1
project.title=OpenAPI for RESTXQ project.title=OpenAPI for RESTXQ
project.abbrev=openapi-develop project.abbrev=openapi-develop
project.processorversion=4.6.0 project.processorversion=4.6.0
......
...@@ -42,12 +42,16 @@ as map(*) { ...@@ -42,12 +42,16 @@ as map(*) {
return return
$inspect $inspect
let $config := doc($target || "/openapi-config.xml")/* let $config-uri := $target || "/openapi-config.xml"
let $repo := doc($target || "/repo.xml")/* let $config := if(doc-available($config-uri))
then doc($config-uri)/*
let $config := if(doc-available($config-uri))
then doc($config-uri)/*
else doc( replace(system:get-module-load-path(), '^(xmldb:exist://)?(embedded-eXist-server)?(.+)$', '$3') || "/openapi-config.xml" )/*
let $expath := doc($target || "/expath-pkg.xml")/* let $expath := doc($target || "/expath-pkg.xml")/*
return return
map:merge(( map:merge((
map{"openapi": "3.0.1"}, map{"openapi": "3.0.2"},
openapi:paths-object($module), openapi:paths-object($module),
openapi:servers-object($config/openapi:servers), openapi:servers-object($config/openapi:servers),
openapi:info-object($expath, $repo, $config/openapi:info), openapi:info-object($expath, $repo, $config/openapi:info),
......
...@@ -14,9 +14,11 @@ declare option output:media-type "application/json"; ...@@ -14,9 +14,11 @@ declare option output:media-type "application/json";
let $prepare := xmldb:get-child-resources("/db/apps/openapi/content")[. != "openapi.xqm"] let $prepare := xmldb:get-child-resources("/db/apps/openapi/content")[. != "openapi.xqm"]
! exrest:register-module(xs:anyURI("/db/apps/openapi/content/" || .)) ! exrest:register-module(xs:anyURI("/db/apps/openapi/content/" || .))
(: locate the target path :)
let $thisPath := replace(system:get-module-load-path(),
'^(xmldb:exist://)?(embedded-eXist-server)?(.+)$', '$3')
let $target := request:get-parameter("target", $thisPath)
return return
(: prepare OpenAPI as map(*) :) (: prepare OpenAPI as map(*) :)
openapi:main("/db/apps/openapi") openapi:main($target)
(: ("paths")("/openapi-test/full/get/{param1}/{param2}.{format}") :)
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