UNPKG

draig-car

Version:

Database REST API interactive generator CLI and REPL OpenAPI3 based JS generator with interactive ORM/ODM REPL

81 lines (79 loc) 1.86 kB
const actions = require('../actions') module.exports = { addelem: { help: '.addelem <apiPathToArray>: add a new element to an existing API array', runnable: true, action(name) { actions.addArrayElemAction.bind(this)(name) } }, addprop: { help: '.addprop <schema>: add a new property to an existing schema', runnable: true, action(name) { actions.addPropertyAction.bind(this)(name) } }, annotate: { help: '.annotate <apiPath>: add a draig annotation under an existing API path', runnable: true, action(name) { actions.annotateAction.bind(this)(name) } }, newsch: { help: '.newsch <template>: add a new schema to the component/schemas ' + 'catalog of current API using schema/<template>', runnable: true, action(name) { actions.newSchemaAction.bind(this)(name) } }, newop: { help: '.newop <template>: add a new operation to ' + 'current API definition using op/<template>', runnable: true, action(name) { actions.newOperationAction.bind(this)(name) } }, edit: { help: '.edit <apiPath>: edit existing (string or number) api PATH element', runnable: true, action(name) { actions.editAction.bind(this)(name) } }, rm: { help: '.rm <apiPath>: remove existing object from ' + 'current API definition - i.e.: .rm paths /example post', runnable: true, action(name) { actions.rmAction.bind(this)(name) } }, ls: { help: '.ls <apiPath>: List object keys of the given API path', runnable: true, action(name) { actions.lsAction.bind(this)(name) } }, cd: { help: 'Change API working object to the given argument', action(name) { actions.cdAction.bind(this)(name) } }, print: { help: '.print <apiPath>: Recursivelly print properties under API path', runnable: true, action(name) { actions.printAction.bind(this)(name) } } }