Skip to content
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

Add FieldRename.pascal #475

Merged
merged 4 commits into from May 9, 2019
Merged

Add FieldRename.pascal #475

merged 4 commits into from May 9, 2019

Conversation

lynn
Copy link
Contributor

@lynn lynn commented May 7, 2019

Adds a pascal value to the FieldRename enum, for PascalCase JSON field name encoding.

Resolves #474.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@lynn
Copy link
Contributor Author

lynn commented May 7, 2019

I signed the Google CLA.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@lynn
Copy link
Contributor Author

lynn commented May 7, 2019

I suppose the Travis build fails because json_serializable depends on json_annotation: '>=2.1.0 <2.3.0', which this PR also changes. I don't know how to fix this.

@kevmoo
Copy link
Collaborator

kevmoo commented May 7, 2019

I suppose the Travis build fails because json_serializable depends on json_annotation: '>=2.1.0 <2.3.0', which this PR also changes. I don't know how to fix this.

You need to add a dependency override to json_serializable.

See 9fcee71#diff-dd8c9829cd89b90a9d3841afafe125be

@@ -31,7 +31,7 @@ String pascalCase(String input) {
if (input.isEmpty) {
return '';
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ABDF – "always be dartfmt"ing 😄

return '';
}

return input[0].toUpperCase() + input.substring(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lrhn is input[0] better/worse than input.substring(0, 1)?

@kevmoo
Copy link
Collaborator

kevmoo commented May 8, 2019

@natebosch @jakemac53 – thoughts on this?

@kevmoo
Copy link
Collaborator

kevmoo commented May 8, 2019 via email

Copy link
Collaborator

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some pubspec/changelog tweaks that should be done, but I'll take care of those.

Thanks!

@kevmoo kevmoo merged commit 7a67f62 into google:master May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: FieldRename.pascal
4 participants