In my custom Web service I am using some of the library functions that are in /MarkLogic/rest-api/
. for eg: I am using some utility functions that are in
/MarkLogic/rest-api/models/search-model-query.xqy
, /MarkLogic/rest-api/lib/endpoint-util.xqy
, /MarkLogic/rest-api/models/config-query-model.xqy
Is it safe to assume that these modules will be backward compatible when ML upgrades, by which I mean the function signatures and what is expected from functions remain same even after upgrades.. Or does ML upgrade documents provide this granular level of what changed from previous version.
Or should I duplicate these functions in my own custom library, just to be safe ?
Even documented functions (ones listed on http://docs.marklogic.com/) can change, but for those you can expect notification about changes in release notes. For internal ones surely not.
It would be safer to copy those, but you might need to copy quite a few, as you would need to copy all included modules too.
Whatever approach you take, it would be best to do (automated) regression testing before you upgrade.
HTH!