Updated code generation

This commit is contained in:
delvedor
2019-01-30 09:32:58 +01:00
parent 2f3e2a6c96
commit fbfb9479b2

View File

@ -349,11 +349,17 @@ function generate (spec, common) {
}
function safeWords (str) {
if (str === 'delete') {
switch (str) {
// delete is a reserved word
case 'delete':
return '_delete'
}
// index is also a parameter
case 'index':
return '_index'
default:
return str
}
}
function generatePickMethod (methods) {
if (methods.length === 1) {