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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top