File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -800,7 +800,7 @@ declare function api:validate-toDate($model as map(*)) as map(*)? {
800800 : Check parameter start
801801~:)
802802declare function api:validate-start ($model as map (*)) as map (*)? {
803- if ($model('start' ) castable as xs:date) then $model
803+ if ($model('start' ) castable as xs:date) then ( map:put ( $model, 'fromDate' , $model( 'start' )) => map:remove ( 'start' ))
804804 else if ($model?start ='' ) then () (: an empty string is simply dropped :)
805805 else error ($api:INVALID_PARAMETER, 'Unsupported date format given: "' || $model('start' ) || '". Should be YYYY-MM-DD.' )
806806};
@@ -809,7 +809,7 @@ declare function api:validate-start($model as map(*)) as map(*)? {
809809 : Check parameter end
810810~:)
811811declare function api:validate-end ($model as map (*)) as map (*)? {
812- if ($model('end' ) castable as xs:date) then $model
812+ if ($model('end' ) castable as xs:date) then ( map:put ( $model, 'toDate' , $model( 'end' )) => map:remove ( 'end' ))
813813 else if ($model?end ='' ) then () (: an empty string is simply dropped :)
814814 else error ($api:INVALID_PARAMETER, 'Unsupported date format given: "' || $model('end' ) || '". Should be YYYY-MM-DD.' )
815815};
You can’t perform that action at this time.
0 commit comments