ElmoVanKielmo opened a new issue #926: CouchDB documentation mismatches the 
real behavior of COPY /{db}/{doc_id} endpoint
URL: https://github.com/apache/couchdb/issues/926
 
 
   ## Expected Behavior
   Example snippets in the official documentation should not end up with errors.
   
   ## Current Behavior
   The following snippets for COPY /{db}/{doc_id} endpoint in HTTP API 
reference have no chance to work. 
http://docs.couchdb.org/en/2.0.0/api/document/common.html#copying-from-a-specific-revision
   
http://docs.couchdb.org/en/2.0.0/api/document/common.html#copying-to-an-existing-document
   
http://docs.couchdb.org/en/2.1.0/api/document/common.html#copying-from-a-specific-revision
   
http://docs.couchdb.org/en/2.1.0/api/document/common.html#copying-to-an-existing-document
   
   These examples clearly suggest that a document can be copied this way from 
one database to another but they all end up with 
`{"error":"bad_request","reason":"Destination URL must be relative."}`.
   
   ## Possible Solution
   Update the documentation to match the real behavior.
   
   ## Steps to Reproduce (for bugs)
   1. Try to execute the snippets given in the documentation, given that db 
names, doc ids and revisions exist or replace them in the snippet with what is 
on your CouchDB
   
   ## Context
   I was trying to copy documents between databases. I'm very familiar with 
CouchDB replication but we wanted something more performant in a specific 
scenario when one database is a source (like a template) for thousands of 
target databases, replication is always unidirectional and revision history (of 
these documents coming from a template) is irrelevant in target databases. I 
know there are other ways to achieve this but the goal of this issue report is 
solely to fix the documentation not to confuse further readers.
   
   ## Your Environment
   * Version used: 2.1.0 and 2.0.0
   * Browser Name and version: curl 7.52.1
   * Operating System and version (desktop or mobile): x86_64-pc-linux-gnu
   * Link to your project: https://www.immmr.com/
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to