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

Don't camel case the description for EnumValue by default #60

Merged
merged 5 commits into from
Jun 17, 2017
Merged

Don't camel case the description for EnumValue by default #60

merged 5 commits into from
Jun 17, 2017

Conversation

maicki
Copy link
Contributor

@maicki maicki commented Jun 15, 2017

The description for an EnumValue is always in camel case. This should be the responsibility of the consumer to change between different cases and not assumed that camel case is expected every time.

One example is within the integer enum case of #57. We would like to add a comment with the description, currently by default this is in camel case although it's defined in snake case and wanted in snake case.

@rahul-malik
Copy link
Collaborator

@maicki - Can we write some small tests around this and also regenerate the integration test snapshots?

@maicki
Copy link
Contributor Author

maicki commented Jun 16, 2017

@rahul-malik The integration test snapshots are already regenerated, there are no differences (as it should be), I will work on adding tests around this.

XCTAssert("created_at".snakeCaseToPropertyName() == "createdAt")

// (@maicki): This test would currently fail as the result is "CreatedAt".
// XCTAssert("CreatedAt".snakeCaseToPropertyName() == "createdAt")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test would currently fail, @rahul-malik what do you think should be the right output for snakeCaseToPropertyName in this case?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think what you have here is the desired output. I'm assuming we generate createdat right now?

@maicki
Copy link
Contributor Author

maicki commented Jun 16, 2017

@rahul-malik Added a couple of tests for StringExtensionsTests

@ghost
Copy link

ghost commented Jun 16, 2017

🚫 CI failed with log

@ghost
Copy link

ghost commented Jun 17, 2017

1 Warning
⚠️ Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.

Generated by 🚫 Danger

@rahul-malik rahul-malik merged commit 37a6bc3 into pinterest:master Jun 17, 2017
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.

2 participants