-
Notifications
You must be signed in to change notification settings - Fork 6k
Issue 5978 #6431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Issue 5978 #6431
Conversation
@@ -65,7 +65,7 @@ export default class {{classname}} {{#parent}}{{^parentModel}}{{#vendorExtension | |||
* @member {{=< >=}}{<&vendorExtensions.x-jsdoc-type>}<={{ }}=> {{baseName}}{{#defaultValue}} | |||
* @default {{{defaultValue}}}{{/defaultValue}} | |||
*/{{/emitJSDoc}} | |||
{{baseName}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; | |||
{{name}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}undefined{{/defaultValue}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CodeNinjai I still think this should be {{name}} instead of {{baseName}}
e.g. {{baseName}} (original name specified in the spec) can be "modified-date" while {{name}} is the variable name following JS style guide (e.g. modified_date)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wing328 So that what the change does, doesn't it? It changes {{ baseName }}
to {{ name }}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frol ah sorry. You're right. I misread.
@@ -500,7 +509,7 @@ public String toVarName(String name) { | |||
|
|||
// camelize (lower first character) the variable name | |||
// pet_id => petId | |||
name = camelize(name, true); | |||
//name = camelize(name, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CodeNinjai Commenting out camelize
will probably impact JS ES5 output as well. Shall we keep it as it's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CodeNinjai Given the code style guides for JS, camel-case should be used for variable and method names. Please, bring it back.
Also, it seems that the custom name.matches(...)
should be simply placed into sanitizeName
once instead of copy-pasting.
// Browser globals (root is window) | ||
factory(root.expect, root.{{moduleName}}); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this going to work? The module will be empty since the factory
isn't called.
@@ -1,19 +1,12 @@ | |||
{{>licenseInfo}} | |||
import expect, { createSpy, spyOn, isSpy } from 'expect'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any use of these.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for breaking (non-backward compatible) changes.Description of the PR
Fixes #5978