Skip to content

feat: Complete Assets module STJ migration (v1.0.0-beta.4)#177

Open
OMpawar-21 wants to merge 6 commits into
enhc/betafrom
enhc/DX-7304
Open

feat: Complete Assets module STJ migration (v1.0.0-beta.4)#177
OMpawar-21 wants to merge 6 commits into
enhc/betafrom
enhc/DX-7304

Conversation

@OMpawar-21
Copy link
Copy Markdown
Contributor

Summary

This PR migrates the Assets module from Newtonsoft.Json to System.Text.Json, improving performance and reducing dependencies.

Changes Made

Models Updated

  • Updated Asset, Folder, and Version models to use System.Text.Json
  • Maintained backward compatibility for existing API consumers

Services Migrated

  • Migrated asset upload, folder management, and versioning services
  • Replaced legacy JSON serialization with modern STJ APIs
  • Updated service constructors to use JsonSerializerOptions

Performance Improvements

  • Reduced memory allocation during JSON operations
  • Improved serialization performance for asset operations
  • Streamlined JSON writing with Utf8JsonWriter

Technical Details

  • All asset-related services now use System.Text.Json
  • Service constructors updated to accept JsonSerializerOptions
  • JSON writing operations migrated to Utf8JsonWriter
  • Zero breaking changes to public API

Testing

  • All builds pass successfully
  • Asset operations function correctly
  • No regressions in existing functionality

Breaking Changes

None. This is an internal refactoring that maintains full API compatibility.

Benefits

  • Improved JSON serialization performance
  • Reduced package dependencies
  • Better alignment with .NET ecosystem standards
  • Enhanced memory efficiency for asset operations

- Migrate Asset.cs, AssetModel.cs, Folder.cs, Version.cs to System.Text.Json
- Update service constructors to use JsonSerializerOptions instead of JsonSerializer
- Replace JsonTextWriter with Utf8JsonWriter in asset services
- Re-enable Stack.Asset() method and asset-related services in csproj
@OMpawar-21 OMpawar-21 requested a review from sunil-lakshman May 20, 2026 06:57
@OMpawar-21 OMpawar-21 requested a review from a team as a code owner May 20, 2026 06:58
@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

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.

1 participant