-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix model generator for snake case on dart-jaguar client generator #1076
Fix model generator for snake case on dart-jaguar client generator #1076
Conversation
@@ -2,6 +2,7 @@ part '{{classFilename}}.jser.dart'; | |||
|
|||
class {{classname}} { | |||
{{#vars}}{{#description}} /* {{{description}}} */{{/description}} | |||
@Alias('{{baseName}}') |
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.
@jaumard thanks for the PR. I would suggest using {{{baseName}}}
as {{baseName}}
may escape special characters in HTML.
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.
But here we want them to be escaped anyway. It's should be plain text only as it's the name of the JSON field
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.
@jaumard We've encountered some edge cases before (e.g. JSON key is "student"). I don't think these occur very often but still prefer using {{{baseName}}} to make it consistent with other generators.
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.
No problem :) it's done ^^
@wing328 |
@jaumard ah ok. Thanks for the explanation. |
68afe75
to
1ec9654
Compare
No description provided.