Open digitalsadhu opened 7 years ago
@pnw This look right to you?
you already have a get verb, so don't try to re-create it
verbs = input.split(',')
to get the list of desired verbs? Here is the closest thing I can find to a definitive list of official HTTP verbs plus some MS-invented ones. On second thought though, I suppose we just allow the verbs that express allows (assuming Ash is built on top of express)--crud
flag or shorthand, single-letter version of these verbs, like -cru
for get,post,put or -crudoha
for get,post,put,patch,delete,options,headRe: whitelisted verbs, maybe the way to do it is like in the config.js,
ENV.verbs = ['get', 'post', 'put', 'delete', 'patch', 'option']
kind of thing. And the default value for that is all of the verbs that express allows out of the box. Looking into it a bit, it seems that express only allows a specific set of verbs defined by what the http
module allows.
Without --verbs
Would generate
and
With --verbs
1.
Would generate
2.
Would generate
and