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

Conversation

@lynn
Copy link
Contributor

commented May 7, 2019

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

Resolves #474.

@googlebot

This comment has been minimized.

Copy link

commented May 7, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

I signed the Google CLA.

@googlebot

This comment has been minimized.

Copy link

commented May 7, 2019

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@lynn

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

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 '';
}

This comment has been minimized.

Copy link
@kevmoo

kevmoo May 8, 2019

Member

ABDF – "always be dartfmt"ing 😄

return '';
}

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

This comment has been minimized.

Copy link
@kevmoo

kevmoo May 8, 2019

Member

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

@kevmoo

This comment has been minimized.

Copy link
Member

commented May 8, 2019

@natebosch @jakemac53 – thoughts on this?

@kevmoo

This comment has been minimized.

Copy link
Member

commented May 8, 2019

@kevmoo

kevmoo approved these changes May 9, 2019

Copy link
Member

left a comment

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

Thanks!

@kevmoo kevmoo merged commit 7a67f62 into dart-lang:master May 9, 2019

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.