| 86 | // PATCHABLE |
| 87 | |
| 88 | const patchableProps = () => ({ |
| 89 | patches: me.array({ title: 'Patches' }, { |
| 90 | _id: me.objectId({ links: [{ rel: 'db', href: '/db/patch/{($)}' }], title: 'Patch ID', description: 'A reference to the patch.' }), |
| 91 | status: { enum: ['pending', 'accepted', 'rejected', 'cancelled'] }, |
| 92 | }), |
| 93 | |
| 94 | allowPatches: { type: 'boolean' }, |
| 95 | |
| 96 | watchers: me.array({ title: 'Watchers' }, |
| 97 | me.objectId({ links: [{ rel: 'extra', href: '/db/user/{($)}' }] })), |
| 98 | }) |
| 99 | |
| 100 | me.extendPatchableProperties = function (schema) { |
| 101 | if (schema.properties == null) { schema.properties = {} } |