Skip to content

mgmt: (fix): Handle boolean fields returned as strings#1015

Merged
kailash-b merged 1 commit into
masterfrom
feat/SDK-8724
May 25, 2026
Merged

mgmt: (fix): Handle boolean fields returned as strings#1015
kailash-b merged 1 commit into
masterfrom
feat/SDK-8724

Conversation

@kailash-b
Copy link
Copy Markdown
Contributor

@kailash-b kailash-b commented May 21, 2026

Changes

This PR adds a BooleanStringConverter to 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) - a JsonConverter<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 in JsonOptions.
  • Other:

    • Updated .fernignore to preserve the new converter and its tests from Fern code generation.

References

Testing

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.35%. Comparing base (2dc5d21) to head (9e05e74).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...Auth0.ManagementApi/Core/BooleanStringConverter.cs 80.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1015   +/-   ##
=======================================
  Coverage   31.35%   31.35%           
=======================================
  Files        2711     2712    +1     
  Lines      107757   107773   +16     
  Branches     6328     6330    +2     
=======================================
+ Hits        33788    33797    +9     
- Misses      72200    72205    +5     
- Partials     1769     1771    +2     
Flag Coverage Δ
authIntTests 2.98% <62.50%> (+<0.01%) ⬆️
mgmtIntTests 30.08% <81.25%> (+<0.01%) ⬆️
unittests 0.31% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kailash-b kailash-b marked this pull request as ready for review May 21, 2026 06:59
@kailash-b kailash-b requested a review from a team as a code owner May 21, 2026 06:59
@kailash-b kailash-b enabled auto-merge May 25, 2026 10:48
@kailash-b kailash-b merged commit f898e21 into master May 25, 2026
15 of 18 checks passed
@kailash-b kailash-b deleted the feat/SDK-8724 branch May 25, 2026 10:49
@kailash-b kailash-b changed the title fix: Handle boolean fields returned as strings mgmt: Handle boolean fields returned as strings May 28, 2026
@kailash-b kailash-b changed the title mgmt: Handle boolean fields returned as strings mgmt: (fix): Handle boolean fields returned as strings May 28, 2026
@kailash-b kailash-b mentioned this pull request May 28, 2026
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