Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
fix: javascript camelCase properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mdibaiee committed Jun 29, 2020
1 parent 6a61910 commit e8d0f4e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtensions.x-is-array}}e
{{#vars}}
if (data.hasOwnProperty('{{baseName}}')) {
obj['{{baseName}}']{{{defaultValueWithParam}}}

if ('{{baseName}}' !== '{{name}}') {
Object.defineProperty(obj, '{{name}}', {
get() {
return obj['{{baseName}}'];
}
});
}
}
{{/vars}}
}
Expand Down

0 comments on commit e8d0f4e

Please sign in to comment.