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

[FIX] MethodViewResolver CamelCase Methods #1467

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

jdkent
Copy link
Contributor

@jdkent jdkent commented Feb 18, 2022

Fixes #1466 .

dependent on #1465

Changes proposed in this pull request:

  • change view_name to be CamelCase instead of a mix of CamelCase and snake_case.
  • update tests to output CamelCase for MethodViewResolver

@RobbeSneyders
Copy link
Member

Thanks for the PR @jdkent!
We already depend on inflection for this kind of string manipulation, so we could use inflection.camelize instead. It takes into account some more edge cases. E.g. for 'test_API', your implementation will return TestApi, while inflection.camelize will return TestAPI.

@jdkent
Copy link
Contributor Author

jdkent commented Feb 21, 2022

awesome, didn't know about inflection, very useful! switched to using that package instead of regular expressions.

@coveralls
Copy link

coveralls commented Feb 21, 2022

Pull Request Test Coverage Report for Build 1877500334

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.745%

Totals Coverage Status
Change from base Build 1877484739: 0.001%
Covered Lines: 2883
Relevant Lines: 2980

💛 - Coveralls

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

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

Thanks @jdkent!

@RobbeSneyders RobbeSneyders merged commit 40d9dad into spec-first:main Feb 22, 2022
@jdkent jdkent deleted the fix/methodresolver branch April 5, 2022 16:34
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.

MethodViewResolver inconsistent documentation/incorrect(?) behavior
3 participants