fix: Handle boolean fields returned as strings#1015
Open
kailash-b wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1015 +/- ##
==========================================
+ Coverage 31.35% 31.36% +0.01%
==========================================
Files 2709 2710 +1
Lines 107737 107753 +16
Branches 6328 6330 +2
==========================================
+ Hits 33782 33799 +17
+ Misses 72185 72184 -1
Partials 1770 1770
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR adds a
BooleanStringConverterto handle boolean fields that the Auth0 server may return as JSON strings (e.g.,"true"/"false") instead of native JSON booleans.Classes added:
BooleanStringConverter(src/Auth0.ManagementApi/Core/BooleanStringConverter.cs) - aJsonConverter<bool>that handles deserialization of both native JSON booleans and string-encoded booleans ("true","false", case-insensitive). Serialization always writes native JSON booleans.Classes modified:
JsonConfiguration(src/Auth0.ManagementApi/Core/JsonConfiguration.cs) - registered the new converter globally inJsonOptions.Other:
.fernignoreto preserve the new converter and its tests from Fern code generation.References
Testing
Checklist