Skip to content

Commit

Permalink
new docTypes for the API
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jun 27, 2017
1 parent da269f7 commit 957d590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions api/v1/swagger.json
Expand Up @@ -434,8 +434,11 @@
"documents",
"letters",
"news",
"orgs",
"persons",
"places",
"thematicCommentaries",
"var",
"works",
"writings"
]
Expand Down
4 changes: 2 additions & 2 deletions modules/api.xqm
Expand Up @@ -137,7 +137,7 @@ declare function api:ant-deleteResources($model as map()) {
~:)
declare %private function api:resolve-docTypes($model as map()) as xs:string* {
if(exists($model('docType'))) then $model('docType')
else for $func in wdt:members('indices') return $func(())('name')
else for $func in wdt:members('unary-docTypes') return $func(())('name')
};

(:~
Expand Down Expand Up @@ -210,7 +210,7 @@ declare function api:codeSample($nodes as node()*, $model as map()) as map()* {
: Check parameter docType and split comma separated value into a sequence
~:)
declare function api:validate-docType($model as map()) as map()? {
let $wega-docTypes := for $func in wdt:members('indices') return $func(())('name')
let $wega-docTypes := for $func in wdt:members('unary-docTypes') return $func(())('name')
return
map:entry(
'docType',
Expand Down

0 comments on commit 957d590

Please sign in to comment.