Migrate JsonPatch from Newtonsoft to System.Text.Json #671
Merged
KrzysztofPajak merged 3 commits intodevelopfrom Apr 1, 2026
Merged
Migrate JsonPatch from Newtonsoft to System.Text.Json #671KrzysztofPajak merged 3 commits intodevelopfrom
KrzysztofPajak merged 3 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the API module to use JSON Patch with System.Text.Json instead of Newtonsoft-based infrastructure, along with minor OpenAPI-related robustness tweaks.
Changes:
- Replaces Newtonsoft JSON Patch dependencies with
Microsoft.AspNetCore.JsonPatch.SystemTextJsonand updates controllers to the new namespace. - Removes the previous Newtonsoft JSON Patch input formatter wiring/helper.
- Hardens
IgnoreFieldSchemaTransformeragainst null/collection-modification issues and updates appsettings comments around Scalar docs.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Web/Grand.Web/App_Data/appsettings.json | Enables the API module and adds comments for Scalar doc URLs. |
| src/Modules/Grand.Module.Api/Infrastructure/Transformers/IgnoreFieldSchemaTransformer.cs | Adds null checks and materializes keys before removal. |
| src/Modules/Grand.Module.Api/Infrastructure/OpenApiStartup.cs | Removes Newtonsoft JsonPatch input formatter registration. |
| src/Modules/Grand.Module.Api/Grand.Module.Api.csproj | Swaps JsonPatch/Newtonsoft packages for SystemTextJson JsonPatch package. |
| src/Modules/Grand.Module.Api/Extensions/ServiceCollectionExtensions.cs | Removes the Newtonsoft JsonPatch input formatter helper. |
| src/Modules/Grand.Module.Api/Controllers/*.cs | Updates JsonPatch using directives to ...SystemTextJson. |
| Directory.Packages.props | Central package version updates for JsonPatch migration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… Development-only constraint Agent-Logs-Url: https://github.com/grandnode/grandnode2/sessions/cf4ebe9c-d4e9-42da-b121-a5406393ef5d Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com>
|
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.



/scalar/to/scalar/v2and added Development-only note/scalar/to/scalar/v1and added Development-only note