feat!: modernize SDK contract, add CI tests, and improve migration docs#46
Merged
feat!: modernize SDK contract, add CI tests, and improve migration docs#46
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a breaking v6 update for the Facturapi .NET SDK that modernizes the public contract (wrapper interfaces), updates supported target frameworks, adds a regression test suite to CI, and refreshes migration-focused documentation.
Changes:
- Replace concrete wrapper types in
IFacturapiClient/FacturapiClientwith wrapper interfaces, and update wrappers to implement those interfaces. - Drop
net452, add SourceLink/symbol packaging settings, and introduce an advanced factory for injecting a customHttpClient. - Add
FacturapiTestregression tests and run them in CI before packing/publishing; update README/CHANGELOG with v6 migration guidance.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| facturapi-net.sln | Adds test project to solution and new build configurations. |
| facturapi-net.csproj | Drops net452, bumps version to 6.0.0, adds SourceLink/symbol settings, excludes test sources from library compilation. |
| Wrappers/WebhookWrapper.cs | Implements IWebhookWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/ToolWrapper.cs | Implements IToolWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/RetentionWrapper.cs | Implements IRetentionWrapper, fixes retention list route name, hardens CancelAsync (token + shared error handling + disposal). |
| Wrappers/ReceiptWrapper.cs | Implements IReceiptWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/ProductWrapper.cs | Implements IProductWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/OrganizationWrapper.cs | Implements IOrganizationWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/InvoiceWrapper.cs | Implements IInvoiceWrapper, introduces StampDraftAsync + obsolete legacy alias, adds ConfigureAwait(false) to internal awaits. |
| Wrappers/IWebhookWrapper.cs | New interface to enable mocking/DI of webhook operations. |
| Wrappers/IToolWrapper.cs | New interface to enable mocking/DI of tool operations. |
| Wrappers/IRetentionWrapper.cs | New interface to enable mocking/DI of retention operations. |
| Wrappers/IReceiptWrapper.cs | New interface to enable mocking/DI of receipt operations. |
| Wrappers/IProductWrapper.cs | New interface to enable mocking/DI of product operations. |
| Wrappers/IOrganizationWrapper.cs | New interface to enable mocking/DI of organization operations. |
| Wrappers/IInvoiceWrapper.cs | New interface to enable mocking/DI of invoice operations (incl. legacy obsolete member). |
| Wrappers/ICustomerWrapper.cs | New interface to enable mocking/DI of customer operations. |
| Wrappers/ICatalogWrapper.cs | New interface to enable mocking/DI of catalog operations. |
| Wrappers/ICartaporteCatalogWrapper.cs | New interface to enable mocking/DI of Carta Porte catalog operations. |
| Wrappers/CustomerWrapper.cs | Implements ICustomerWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/CatalogWrapper.cs | Implements ICatalogWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/CartaporteCatalogWrapper.cs | Implements ICartaporteCatalogWrapper and adds ConfigureAwait(false) to internal awaits. |
| Wrappers/BaseWrapper.cs | Ensures error-path content read uses ConfigureAwait(false). |
| Router/Router.cs | Makes query-string building null/empty-safe and ignores empty keys. |
| Router/RetentionRouter.cs | Renames ListRetentionss to ListRetentions. |
| README.md | Adds v6 migration guidance and updates examples for async usage + custom HttpClient factory. |
| Properties/AssemblyInfo.cs | Adds InternalsVisibleTo("FacturapiTest") to support testing internals. |
| IFacturapiClient.cs | Switches wrapper properties from concrete wrappers to interfaces. |
| FacturapiTest/FacturapiTest.csproj | Adds a net6 test project with xUnit. |
| FacturapiTest/ClientCompatibilityTests.cs | Adds regression tests for query building, retention cancel error parsing, legacy stamp method, and custom HttpClient disposal behavior. |
| FacturapiClient.cs | Updates public surface to wrapper interfaces; adds CreateWithCustomHttpClient and ownership-based disposal. |
| CHANGELOG.md | Documents v6 breaking changes, migration guide, and notable fixes/additions. |
| .github/workflows/deploy.yml | Runs dotnet test before packing/publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
raul-facturapi
approved these changes
Mar 31, 2026
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.
Summary
IFacturapiClientto wrapper interfaces and updateFacturapiClientaccordinglynet452and keepnetstandard2.0,net6.0, andnet8.0FacturapiClient.CreateWithCustomHttpClient(...)(without expanding the public constructor)Retention.CancelAsync,StampDraftAsync+ obsolete alias, null-safe query builder,ConfigureAwait(false)consistency)FacturapiTestregression suite and run tests in CI before NuGet publishCommits
feat!: modernize client contract and runtime targetstest(ci): add regression test project and run it before publishdocs: prioritize migration guidance and update usage examplesValidation
dotnet restoredotnet build facturapi-net.sln -c Release --no-restoredotnet test FacturapiTest/FacturapiTest.csproj -c Release --no-build