Repository navigation
Conversation
Make the client usable in trimmed and Native AOT apps. The package is now marked IsAotCompatible for .NET 8 and newer and builds without trim or AOT warnings. Library - Remove the Newtonsoft.Json dependency. Cookies, bookmarks and simple maps go through a source-generated JsonSerializerContext; loosely typed values (metadata, overlay options, extra headers) are written by JsonObjectWriter, which inspects runtime types instead of reflecting. - Annotate FacetBase with DynamicallyAccessedMembers so the [MultiFormHeader] properties survive trimming. - Rewrite GotenbergApiException.ToVerboseJson with Utf8JsonWriter. - Replace the [Description] reflection lookup for dimension units with a switch, and use the generic Enum.GetValues on .NET 5+. - Reference System.Text.Json 8.0.5 on the netstandard targets. Breaking changes - JObject is gone from the public API. PdfOutputOptions.MetaData, WriteMetadataRequest.Metadata, WatermarkOptions.Options, StampOptions.Options and HtmlConversionBehaviors.ExtraHeaders are now IDictionary<string, object>; builder overloads take that or a System.Text.Json.Nodes.JsonObject. - Dictionary values must be primitives, dates, byte arrays, dictionaries, collections or JsonNode/JsonElement. Other object types throw NotSupportedException when passed to the builder. - Builders copy the supplied dictionary (shallow). - ReadPdfBookmarksAsync throws System.Text.Json.JsonException on malformed JSON; an empty body returns no bookmarks. - ToVerboseJson writes a fixed set of fields, and JSON form fields are sent compact rather than indented. Tests and CI - Add test/GotenbergSharpClient.AotSmokeTest, a Native AOT console app that exercises the client against an in-process stub and, when GOTENBERG_URL is set, a live Gotenberg. Trim and AOT warnings fail its publish. - Publish and run the smoke test in deploy.yml before Pack. - Move the test projects, examples and CI to .NET 10. - Convert test assertions to System.Text.Json.Nodes and add JsonValueHandlingTests for the new value handling. Examples and docs - Fix five examples that referenced namespaces removed in v3.0.0, and add all examples to the solution so CI builds them. - Correct the using statements in docs/getting-started.md.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (49)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe client replaces Newtonsoft.Json with System.Text.Json and source-generated serialization. JSON-facing builder and model APIs change to dictionaries or JsonObject. The pull request also adds Native AOT smoke tests, updates examples and documentation, and moves the workflow and example projects to .NET 10. ChangesClient JSON and AOT changes
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The JSON migration shows no confirmed merge-blocking problem in the reviewed evidence. Normal CI and the AOT smoke test remain the final checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The checked request paths preserve the separation between browser headers and service authentication. Consumers must adapt to breaking JSON API changes and should not treat shallow dictionary copies as immutable requests. No introduced security vulnerability was established, but consumer and runtime coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 18.52% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 81 functions across 41 files. (8 skipped: 8 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Make the client usable in trimmed and Native AOT apps. The package is now marked IsAotCompatible for .NET 8 and newer and builds without trim or AOT warnings.
Library
Breaking changes
Tests and CI
Examples and docs
Summary by CodeRabbit
JsonObject. Unsupported dictionary value types throw an exception.JsonObjectinstead ofJObject.