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 NamingPolicy option #85

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Conversation

Odonno
Copy link
Contributor

@Odonno Odonno commented Mar 19, 2024

  • Add ability to set NamingPolicy option part of the ConnectionString, having a set of predefined options (camel case, snake cases, kebab cases and default: Pascal case).
  • Completed MapSurrealEndpoints extensions to handle naming policy including PATCH that should use camelCase as recommended
  • Fix id (de)serialization when naming policy is uppercase

BREAKING CHANGE: As per .NET naming policy, default naming policy is now Default (Pascal case) and no longer snake case.

Fixes #80

@Odonno Odonno marked this pull request as draft March 19, 2024 20:43
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.29787% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 69.43%. Comparing base (cd66f74) to head (ff644da).

Files Patch % Lines
...b.Net/Internals/Json/SurrealDbSerializerOptions.cs 84.78% 6 Missing and 1 partial ⚠️
...ons/DependencyInjection/SurrealDbOptionsBuilder.cs 88.46% 2 Missing and 1 partial ⚠️
SurrealDb.Net/SurrealDbClient.cs 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #85      +/-   ##
==========================================
+ Coverage   69.14%   69.43%   +0.29%     
==========================================
  Files         110      110              
  Lines        4427     4499      +72     
  Branches      432      438       +6     
==========================================
+ Hits         3061     3124      +63     
- Misses       1148     1155       +7     
- Partials      218      220       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Odonno Odonno marked this pull request as ready for review March 20, 2024 11:02
@kearfy kearfy merged commit aff390a into surrealdb:main Mar 27, 2024
2 checks passed
@Odonno Odonno deleted the feat/naming-policy branch March 27, 2024 13:58
@ronnieoverby
Copy link

Glad to see the breaking change in response to #80.

I think a breaking change is the lesser of two evils given the prevailing .NET idioms and conventions.

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.

JsonNamingPolicy Question
4 participants