Question

I have a bunch of json-schema documents in my _design doc which are used for validation in validate_doc_update.

For my api, I also want to make these documents available to clients as attachments to the _design doc, so I want to have couchapp duplicate files before serialising the doc to upload:

/_attachments
    /schema
        /user.json
        /post.json
    ...
/schema
    /user.json
    /post.json

From looking around the web for a solution to this, it seems like its something a lot of people want to do, is there a solution?

Was it helpful?

Solution

I suggest that you do this manually, i.e. instead of running your ordinary push command you could do something like rsync schema/* _attachments/schema/ && couchapp push <host>.

However, please note that the couchapp tool is deprecated. You might want to have a look at kanso or erica instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top