0

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?

MikeB
  • 928
  • 9
  • 24

1 Answers1

0

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.

brdlph
  • 619
  • 4
  • 15
  • Thanks, I hadn't realised that couchapp was deprecated, I had looked a little at kanso and did see it had support for addons which might be able to do this kind of thing. – MikeB Apr 18 '13 at 19:01
  • It looks like kanso does this as I want through the attachments package. – MikeB Apr 21 '13 at 21:01