-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
feat: add support for name based serialisation of JMS enums #2355
Conversation
540b3cf
to
73c02ce
Compare
73c02ce
to
c8993a7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2355 +/- ##
==========================================
+ Coverage 89.36% 89.37% +0.01%
==========================================
Files 77 77
Lines 2849 2853 +4
==========================================
+ Hits 2546 2550 +4
Misses 303 303 ☔ View full report in Codecov by Sentry. |
@DjordyKoert With JMS 3.31 out this change is required for this bundle to be able to work with that version of JMS. |
Would it make sense to split this PR? |
I splitted it on commit level for that purpose, but makes sense to split it on PR level as well. I've created #2372 for the fix, and updated this PR to only contain the new feature. Removing the fix commit from this PR results in a merge conflict, so I will do that once the new PR has been handled. |
#2372 has been merged :) |
0237c9d
to
b0af8a0
Compare
b0af8a0
to
f90f083
Compare
Updates have been done, should be ready 😃 |
Thank you 😄 |
| Q | A | |---------------|---------------------------------------------------------------------------------------------------------------------------| | Bug fix? | no | | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | | Issues | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally: - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. --> This PR add a method to detect when the developer has annotated their property with a JMS type that specifies that the backed enum needs to be serialized with its name instead of value. I needed to use the serialization context as the model options are not included in the model hash, while I do need to generate a new unique description. I've chosen to append `Name` to the resulting Model name. Depends on #2372 (cherry picked from commit 9ee5f58)
This PR add a method to detect when the developer has annotated their property with a JMS type that specifies that the backed enum needs to be serialized with its name instead of value. I needed to use the serialization context as the model options are not included in the model hash, while I do need to generate a new unique description. I've chosen to append
Name
to the resulting Model name.Depends on #2372