Updated code generation
This commit is contained in:
@ -349,10 +349,16 @@ function generate (spec, common) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function safeWords (str) {
|
function safeWords (str) {
|
||||||
if (str === 'delete') {
|
switch (str) {
|
||||||
return '_delete'
|
// delete is a reserved word
|
||||||
|
case 'delete':
|
||||||
|
return '_delete'
|
||||||
|
// index is also a parameter
|
||||||
|
case 'index':
|
||||||
|
return '_index'
|
||||||
|
default:
|
||||||
|
return str
|
||||||
}
|
}
|
||||||
return str
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generatePickMethod (methods) {
|
function generatePickMethod (methods) {
|
||||||
|
|||||||
Reference in New Issue
Block a user