Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Improve capture to capture REST properties correctly #238

Closed
grtjn opened this issue May 9, 2014 · 2 comments
Closed

Improve capture to capture REST properties correctly #238

grtjn opened this issue May 9, 2014 · 2 comments
Assignees

Comments

@grtjn
Copy link
Contributor

grtjn commented May 9, 2014

If you capture the modules-db of an App Builder application, that will also capture the REST api properties directly out of the database. If you try to deploy that as is to somewhere else, Roxy will stop you saying the properties are in old format. Related to #188.

The capture should instead use the REST api to retrieve the properties in their correct format. This does require knowing the port number. That can be derived from the server name of the App Builder application. The modules-db can also be derived from that server name. The capture command would become:

ml local capture --app-builder=my-app-builder-app
@grtjn
Copy link
Contributor Author

grtjn commented May 13, 2014

Here a manual work-around as well:

<map:map xmlns:map="http://marklogic.com/xdmp/map" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <map:entry key="content-versions">
    <map:value xsi:type="xs:string">none</map:value>
  </map:entry>
  <map:entry key="validate-options">
    <map:value xsi:type="xs:boolean">true</map:value>
  </map:entry>
  <map:entry key="document-transform-out">
    <map:value xsi:type="xs:string">appidentitytransform</map:value>
  </map:entry>
  <map:entry key="debug">
    <map:value xsi:type="xs:boolean">false</map:value>
  </map:entry>
  <map:entry key="error-format">
    <map:value xsi:type="xs:string">json</map:value>
  </map:entry>
  <map:entry key="validate-queries">
    <map:value xsi:type="xs:boolean">false</map:value>
  </map:entry>
  <map:entry key="can-copy">
    <map:value xsi:type="xs:boolean">true</map:value>
  </map:entry>
</map:map>
let $map := map:map($mapxml)
return
  <properties xmlns="http://marklogic.com/rest-api">{
    for $key in map:keys($map)
    where $key != 'can-copy'
    return
      element { xs:QName($key) } { map:get($map, $key) }
  }</properties>

@grtjn grtjn added the capture label Feb 20, 2015
@grtjn
Copy link
Contributor Author

grtjn commented Jul 12, 2016

Fixed in dev..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants