Releases: reactiveui/refit
Release list
14.0.0-beta.4
🗞️ What's Changed
💥 Breaking Changes
- e511df2 feat!: reflection-free source-generated request building (#2210) @glennawatson @TimothyMakkison
✨ Features
- 88e1c24 feat: add generic tests to
ReflectionTests(#2195) @TimothyMakkison - 463f5cf feat: add [Timeout] attribute for per-method request timeouts (#2238) @glennawatson
- 294e63a feat: add success guards to the non-generic IApiResponse (#2242) @glennawatson
- f754684 feat: add interface-level [PathPrefix] attribute for a shared route prefix (#2240) @glennawatson
- 99c055b feat: support optional url segments with {name?} syntax (#2237) @glennawatson
- 759a3c0 feat: support returning the built HttpRequestMessage without sending (#2235) @glennawatson
- d9b3d5f feat: support Server-Sent Events as a streaming content format (#2232) @glennawatson
- 1e35cc9 feat: add [Url] attribute for absolute request URLs (#2236) @glennawatson
- 7c33871 feat: add opt-in RefitSettings.ValidateHeaders (#2225) @glennawatson
- b583a34 feat: add null handling for round trip parameter and add verifying test (#2201) @TimothyMakkison
- 485c632 feat: opt-in [FormObject] flattens a model into multipart form fields (#2245) @glennawatson
- 7ac3e1a feat: fix failiure when multiple generic overloads (#2199) @TimothyMakkison
- 852cb2c feat: move version configuration into
AddConfiguredRequestOptions(#2214) @glennawatson @TimothyMakkison - a2b1581 feat: add analyzer diagnostics for invalid Refit interfaces (#2220) @glennawatson
- 4068d97 feature: Create a TransportExceptionFactory to let the user decide the exception to be thrown (#2205) @glennawatson @JaviergarcíadelaNocedaArgüelles @jgarciadelanoceda
- ed63528 feat: optional auth header and scoped authorization token provider (#2221) @glennawatson
- 7bf7b41 feat: inline constrained-generic path-bound objects in the source generator (#2222) @glennawatson
- 14895a4 feat: expose call argument values to DelegatingHandlers (#2223) @glennawatson
- 37efb4e feat: add per-type URL parameter formatter registry (#2226) @glennawatson
- aa1c19b feat: publish method name and route template in request options (#2239) @glennawatson
🐛 Fixes
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 17c24d8 fix: name generated helper types per assembly to avoid InternalsVisibleTo conflicts (#2257) @glennawatson
- 78271e1 fix: generate inline query building for nullable value-type query objects (#2265) @rmja
- 71634f2 fix: escape keyword identifiers in generated interface member names (#2248) @glennawatson
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- 8382bed perf: reduce Refit.Reflection memory allocations (#2267) @glennawatson
- 8cea3f1 perf: reduce runtime Refit memory allocations (#2263) @glennawatson
- b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison - fc06c57 perf: check for
allowUnmatchedParameterbefore callingIndexOf(#2252) @TimothyMakkison - f24d171 perf: wrap helper methods in
MethodImplOptions.AggressiveInlining(#2260) @TimothyMakkison - 147282a perf: replace
StringBuilderwithValueStringBuilderinRoundTripEscapePath(#2253) @TimothyMakkison - 5dcfcc9 perf: cut source generator allocations and roughly halve generation time (#2259) @glennawatson
🧹 General Changes
- 3d0546d build: add PerformanceSharp.Analyzers and upgrade StyleSharp.Analyzers to 3.17.7 (#2206) @glennawatson
- ddc42c9 build: upgrade StyleSharp/PerformanceSharp analyzers to 3.26.0 (#2227) @glennawatson
- a9932f8 chore: enable 1000 lines for real @glennawatson
- 8cc1c37 chore: Relax number of file lines to 1000 lines instead of 500 @glennawatson
- 44f81de ci: gate native AOT smoke test via shared reusable workflow (#2244) @glennawatson
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
✅ Tests
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @glennawatson
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
- e67c5c4 test: cover TransportExceptionFactory cancellation and timeout behavior (#2203) @arpitjain099 @glennawatson
📝 Documentation
- 544db0b docs: make v12 Error.Content migration discoverable and add interface composition example (#2217) @glennawatson
- 69eb3ee docs: document IQueryConverter and httpClientName client-name override (#2233) @glennawatson
📦 Dependencies
- 841ff03 chore(deps): update dependency verify.diffplex to 3.3.1 (#2216) @renovate[bot]
- fb87be5 chore(deps): update dependency verify.tunit to 31.25.0 (#2266) @renovate[bot]
- b920e21 chore(deps): update actions/setup-dotnet action to v6 (#2251) @renovate[bot]
- 136d002 chore(deps): update dependency verify.tunit to 31.24.2 (#2250) @renovate[bot]
- e1512d1 chore(deps): update dependency verify.tunit to 31.24.3 (#2261) @renovate[bot]
🔗 Full Changelog: v13.1.0...v14.0.0-beta.4
🙌 Contributions
🌱 New contributors since the last release: @arpitjain099, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @rmja
💖 Thanks to all the contributors: @arpitjain099, @glennawatson, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @rmja, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
14.0.0-beta.3
🗞️ What's Changed
💥 Breaking Changes
- e511df2 feat!: reflection-free source-generated request building (#2210) @glennawatson @TimothyMakkison
✨ Features
- 88e1c24 feat: add generic tests to
ReflectionTests(#2195) @TimothyMakkison - 463f5cf feat: add [Timeout] attribute for per-method request timeouts (#2238) @glennawatson
- 294e63a feat: add success guards to the non-generic IApiResponse (#2242) @glennawatson
- f754684 feat: add interface-level [PathPrefix] attribute for a shared route prefix (#2240) @glennawatson
- 99c055b feat: support optional url segments with {name?} syntax (#2237) @glennawatson
- 759a3c0 feat: support returning the built HttpRequestMessage without sending (#2235) @glennawatson
- d9b3d5f feat: support Server-Sent Events as a streaming content format (#2232) @glennawatson
- 1e35cc9 feat: add [Url] attribute for absolute request URLs (#2236) @glennawatson
- 7c33871 feat: add opt-in RefitSettings.ValidateHeaders (#2225) @glennawatson
- b583a34 feat: add null handling for round trip parameter and add verifying test (#2201) @TimothyMakkison
- 485c632 feat: opt-in [FormObject] flattens a model into multipart form fields (#2245) @glennawatson
- 7ac3e1a feat: fix failiure when multiple generic overloads (#2199) @TimothyMakkison
- 852cb2c feat: move version configuration into
AddConfiguredRequestOptions(#2214) @glennawatson @TimothyMakkison - a2b1581 feat: add analyzer diagnostics for invalid Refit interfaces (#2220) @glennawatson
- 4068d97 feature: Create a TransportExceptionFactory to let the user decide the exception to be thrown (#2205) @glennawatson @JaviergarcíadelaNocedaArgüelles @jgarciadelanoceda
- ed63528 feat: optional auth header and scoped authorization token provider (#2221) @glennawatson
- 7bf7b41 feat: inline constrained-generic path-bound objects in the source generator (#2222) @glennawatson
- 14895a4 feat: expose call argument values to DelegatingHandlers (#2223) @glennawatson
- 37efb4e feat: add per-type URL parameter formatter registry (#2226) @glennawatson
- aa1c19b feat: publish method name and route template in request options (#2239) @glennawatson
🐛 Fixes
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 17c24d8 fix: name generated helper types per assembly to avoid InternalsVisibleTo conflicts (#2257) @glennawatson
- 71634f2 fix: escape keyword identifiers in generated interface member names (#2248) @glennawatson
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison - fc06c57 perf: check for
allowUnmatchedParameterbefore callingIndexOf(#2252) @TimothyMakkison - f24d171 perf: wrap helper methods in
MethodImplOptions.AggressiveInlining(#2260) @TimothyMakkison - 5dcfcc9 perf: cut source generator allocations and roughly halve generation time (#2259) @glennawatson
- 147282a perf: replace
StringBuilderwithValueStringBuilderinRoundTripEscapePath(#2253) @TimothyMakkison
🧹 General Changes
- 3d0546d build: add PerformanceSharp.Analyzers and upgrade StyleSharp.Analyzers to 3.17.7 (#2206) @glennawatson
- 8cc1c37 chore: Relax number of file lines to 1000 lines instead of 500 @glennawatson
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
- 44f81de ci: gate native AOT smoke test via shared reusable workflow (#2244) @glennawatson
- ddc42c9 build: upgrade StyleSharp/PerformanceSharp analyzers to 3.26.0 (#2227) @glennawatson
✅ Tests
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
- e67c5c4 test: cover TransportExceptionFactory cancellation and timeout behavior (#2203) @arpitjain099 @glennawatson
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @glennawatson
📝 Documentation
- 69eb3ee docs: document IQueryConverter and httpClientName client-name override (#2233) @glennawatson
- 544db0b docs: make v12 Error.Content migration discoverable and add interface composition example (#2217) @glennawatson
📦 Dependencies
- 841ff03 chore(deps): update dependency verify.diffplex to 3.3.1 (#2216) @renovate[bot]
- e1512d1 chore(deps): update dependency verify.tunit to 31.24.3 (#2261) @renovate[bot]
- b920e21 chore(deps): update actions/setup-dotnet action to v6 (#2251) @renovate[bot]
- 136d002 chore(deps): update dependency verify.tunit to 31.24.2 (#2250) @renovate[bot]
🔗 Full Changelog: v13.1.0...v14.0.0-beta.3
🙌 Contributions
🌱 New contributors since the last release: @arpitjain099, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda
💖 Thanks to all the contributors: @arpitjain099, @glennawatson, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
14.0.0-beta.2
🗞️ What's Changed
💥 Breaking Changes
- e511df2 feat!: reflection-free source-generated request building (#2210) @glennawatson @TimothyMakkison
✨ Features
- 88e1c24 feat: add generic tests to
ReflectionTests(#2195) @TimothyMakkison - 485c632 feat: opt-in [FormObject] flattens a model into multipart form fields (#2245) @glennawatson
- 463f5cf feat: add [Timeout] attribute for per-method request timeouts (#2238) @glennawatson
- 294e63a feat: add success guards to the non-generic IApiResponse (#2242) @glennawatson
- 7c33871 feat: add opt-in RefitSettings.ValidateHeaders (#2225) @glennawatson
- f754684 feat: add interface-level [PathPrefix] attribute for a shared route prefix (#2240) @glennawatson
- d9b3d5f feat: support Server-Sent Events as a streaming content format (#2232) @glennawatson
- 99c055b feat: support optional url segments with {name?} syntax (#2237) @glennawatson
- 759a3c0 feat: support returning the built HttpRequestMessage without sending (#2235) @glennawatson
- 1e35cc9 feat: add [Url] attribute for absolute request URLs (#2236) @glennawatson
- b583a34 feat: add null handling for round trip parameter and add verifying test (#2201) @TimothyMakkison
- 7ac3e1a feat: fix failiure when multiple generic overloads (#2199) @TimothyMakkison
- 852cb2c feat: move version configuration into
AddConfiguredRequestOptions(#2214) @glennawatson @TimothyMakkison - a2b1581 feat: add analyzer diagnostics for invalid Refit interfaces (#2220) @glennawatson
- aa1c19b feat: publish method name and route template in request options (#2239) @glennawatson
- 37efb4e feat: add per-type URL parameter formatter registry (#2226) @glennawatson
- 4068d97 feature: Create a TransportExceptionFactory to let the user decide the exception to be thrown (#2205) @glennawatson @JaviergarcíadelaNocedaArgüelles @jgarciadelanoceda
- ed63528 feat: optional auth header and scoped authorization token provider (#2221) @glennawatson
- 7bf7b41 feat: inline constrained-generic path-bound objects in the source generator (#2222) @glennawatson
- 14895a4 feat: expose call argument values to DelegatingHandlers (#2223) @glennawatson
🐛 Fixes
- 71634f2 fix: escape keyword identifiers in generated interface member names (#2248) @glennawatson
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison
🧹 General Changes
- 44f81de ci: gate native AOT smoke test via shared reusable workflow (#2244) @glennawatson
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
- 3d0546d build: add PerformanceSharp.Analyzers and upgrade StyleSharp.Analyzers to 3.17.7 (#2206) @glennawatson
- ddc42c9 build: upgrade StyleSharp/PerformanceSharp analyzers to 3.26.0 (#2227) @glennawatson
✅ Tests
- e67c5c4 test: cover TransportExceptionFactory cancellation and timeout behavior (#2203) @arpitjain099 @glennawatson
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @glennawatson
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
📝 Documentation
- 69eb3ee docs: document IQueryConverter and httpClientName client-name override (#2233) @glennawatson
- 544db0b docs: make v12 Error.Content migration discoverable and add interface composition example (#2217) @glennawatson
📦 Dependencies
🔗 Full Changelog: v13.1.0...v14.0.0-beta.2
🙌 Contributions
🌱 New contributors since the last release: @arpitjain099, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda
💖 Thanks to all the contributors: @arpitjain099, @glennawatson, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
14.0.0-beta.1
Summary
Refit 14 completes the shift to reflection-free, source-generated request building: interfaces whose methods all generate inline no longer touch the reflection request builder, so they are trim- and Native AOT-clean. The reflection request builder is now an opt-in package, and a few hot-path async members return ValueTask instead of Task. These are breaking changes - read the Breaking Changes below and the full v14 migration notes before upgrading.
Alongside that, this release adds a batch of request-shaping features - the new [Url], [PathPrefix], [Timeout], and [FormObject] attributes, optional {name?} URL segments, Server-Sent Events streaming, a per-type URL parameter formatter registry, optional/scoped authorization, building a request without sending it, and exposing call arguments to delegating handlers - plus bug fixes, a performance pass, and new analyzer diagnostics for invalid Refit interfaces.
🗞️ What's Changed
💥 Breaking Changes
- e511df2 feat!: reflection-free source-generated request building (#2210) @glennawatson @TimothyMakkison
✨ Features
- 485c632 feat: opt-in [FormObject] flattens a model into multipart form fields (#2245) @glennawatson
- 88e1c24 feat: add generic tests to
ReflectionTests(#2195) @TimothyMakkison - 463f5cf feat: add [Timeout] attribute for per-method request timeouts (#2238) @glennawatson
- 7c33871 feat: add opt-in RefitSettings.ValidateHeaders (#2225) @glennawatson
- 294e63a feat: add success guards to the non-generic IApiResponse (#2242) @glennawatson
- d9b3d5f feat: support Server-Sent Events as a streaming content format (#2232) @glennawatson
- 759a3c0 feat: support returning the built HttpRequestMessage without sending (#2235) @glennawatson
- f754684 feat: add interface-level [PathPrefix] attribute for a shared route prefix (#2240) @glennawatson
- 99c055b feat: support optional url segments with {name?} syntax (#2237) @glennawatson
- 1e35cc9 feat: add [Url] attribute for absolute request URLs (#2236) @glennawatson
- b583a34 feat: add null handling for round trip parameter and add verifying test (#2201) @TimothyMakkison
- 7ac3e1a feat: fix failiure when multiple generic overloads (#2199) @TimothyMakkison
- 852cb2c feat: move version configuration into
AddConfiguredRequestOptions(#2214) @glennawatson @TimothyMakkison - aa1c19b feat: publish method name and route template in request options (#2239) @glennawatson
- 37efb4e feat: add per-type URL parameter formatter registry (#2226) @glennawatson
- a2b1581 feat: add analyzer diagnostics for invalid Refit interfaces (#2220) @glennawatson
- 4068d97 feature: Create a TransportExceptionFactory to let the user decide the exception to be thrown (#2205) @glennawatson @jgarciadelanoceda
- ed63528 feat: optional auth header and scoped authorization token provider (#2221) @glennawatson
- 7bf7b41 feat: inline constrained-generic path-bound objects in the source generator (#2222) @glennawatson
- 14895a4 feat: expose call argument values to DelegatingHandlers (#2223) @glennawatson
🐛 Fixes
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison
🧹 General Changes
- 44f81de ci: gate native AOT smoke test via shared reusable workflow (#2244) @glennawatson
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
- 3d0546d build: add PerformanceSharp.Analyzers and upgrade StyleSharp.Analyzers to 3.17.7 (#2206) @glennawatson
- ddc42c9 build: upgrade StyleSharp/PerformanceSharp analyzers to 3.26.0 (#2227) @glennawatson
✅ Tests
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
- e67c5c4 test: cover TransportExceptionFactory cancellation and timeout behavior (#2203) @arpitjain099 @glennawatson
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @glennawatson
📝 Documentation
- 69eb3ee docs: document IQueryConverter and httpClientName client-name override (#2233) @glennawatson
- 544db0b docs: make v12 Error.Content migration discoverable and add interface composition example (#2217) @glennawatson
📦 Dependencies
🔗 Full Changelog: v13.1.0...v14.0.0-beta.1
🙌 Contributions
🌱 New contributors since the last release: @arpitjain099, @jgarciadelanoceda
💖 Thanks to all the contributors: @arpitjain099, @glennawatson, @jgarciadelanoceda, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
13.1.0
🗞️ What's Changed
- Fixed the
CS0436build error fromPrimitivesR3BridgeGeneratedAttribute(#2176, #2194). BumpsReactiveUI.Primitivesto 6.0.0, which moves the R3 bridge generator out of the runtime package. Projects usingInternalsVisibleTo(e.g. test projects) build again, and the<Analyzer Remove=... />workaround is no longer needed. - Path parameters now use generated request building instead of reflection (#2174), so they work with
AddRefitGeneratedClientand NativeAOT. Now coversenum,Guid,DateTime/DateTimeOffset/DateOnly/TimeOnly/TimeSpan, all integer widths (incl.Int128/UInt128/Half), and anyIFormattable(#2193).
✨ Features
- b592413 feat: add generated request building support for path parameters in the URL. (#2174) @calebkiage @glennawatson
- 9bc6754 feat: support more path parameter types in generated request building (#2193) @glennawatson
🧹 General Changes
- ac79c76 build: update NuGet dependencies (#2198) @glennawatson
🔗 Full Changelog: v13.0.0...13.1.0
🙌 Contributions
🌱 New contributors since the last release: @calebkiage
💖 Thanks to all the contributors: @calebkiage, @glennawatson
13.0.0
🗞️ What's Changed
Refit 13 is a major release focused on security hardening and a brand-new testing package.
- Security hardening (#2181) — closes issues found in a security audit. XML deserialization is now protected against XXE (external entity) attacks, the Newtonsoft.Json integration no longer honours unsafe
TypeNameHandlingby default (blocking type-confusion/deserialization attacks), and sensitive values (auth headers, tokens) are now redacted from exception and log output. This is the main reason for the major version bump: if you relied on permissive Newtonsoft type handling you may need to opt back in explicitly. - New
Refit.Testingpackage (#2184) — a first-party way to stub and verify Refit clients in tests without spinning up a realHttpClient. Supply canned responses for interface calls and assert which requests your code made, instead of hand-rollingHttpMessageHandlerfakes. - R3 bridge analyzer fix (#2186) — corrects the removal target for the R3 bridge analyzer.
- CI and documentation tidy-ups for SonarCloud on fork pull requests.
✨ Features
- cc24382 feat: security hardening from audit (XXE, Newtonsoft type handling, redaction) (#2181) @glennawatson
- 339cb8d feat: add Refit.Testing package for stubbing and verifying clients (#2184) @glennawatson
🧹 General Changes
- 5d272c8 ci: run SonarCloud on fork pull requests @glennawatson
📝 Documentation
- 533bbbe docs: slim fork-PR SonarCloud wrapper comments @glennawatson
📌 Other
- c0bbb5a [codex] Fix R3 bridge analyzer removal target (#2186) @ChrisPulman
🔗 Full Changelog: v12.1.0...v13.0.0
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman, @glennawatson
12.1.0
🗞️ What's Changed
✨ Features
- 89f17ae feat: AOT-safe generated-only client DI registration and case-insensitive problem+json detection (#2172) @glennawatson
- b31e9fe feat: read sent request body and synchronously inspect the error body on ApiException (#2175) @glennawatson
🐛 Fixes
- e3ec13f fix: correctly annotate error out parameters for nullable flow (#2177) @HulinCedric
📝 Documentation
- db33053 docs: document v12 breaking changes and update package versions (#2180) @ChrisPulman
📦 Dependencies
🔗 Full Changelog: v12.0.0...12.1.0
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman, @glennawatson, @HulinCedric
🤖 Automated services that contributed: @renovate[bot]
12.0.0
Overview
Refit 12.0 is a large release centred on a near-complete rewrite of how requests are built. The source generator now constructs HTTP requests inline at compile time instead of going through the reflection pipeline, making generated clients faster and friendly to trimming and Native AOT. On top of that foundation it adds response streaming, JSON Lines, naming-convention presets, and a batch of long-standing fixes. Two small, well-scoped breaking changes are called out below.
This release also removed netstandard2.0 and netstandard2.1 support. You should to use net462/net8 as your base lines, and use multiple targets if you need to target both.
Highlights
- Reflection-free, AOT-ready source generation. Eligible interface methods now have their request (URI, headers, body, request properties) built directly in generated code, with the reflection request-builder kept only as a fallback for shapes that cannot be generated inline. Form bodies flatten through compiled, source-generated field descriptors. The generator itself was modernised and optimised, and ships analyzer diagnostics and code fixes. There is also a generated-only client-creation mode and a build-time switch for generated request building.
IAsyncEnumerable<T>response streaming. Stream large responses, auto-detecting a JSON array vs JSON Lines from the content type, generated inline on the hot path.- JSON Lines request bodies.
[Body(BodySerializationMethod.JsonLines)]plus a streamingJsonLinesContent(application/x-ndjson), wired through both the reflection and source-gen paths. - Naming-convention presets.
RefitSettings.CamelCase()/SnakeCase()/KebabCase()configure query keys, form-url-encoded keys, and JSON body property names consistently, plus snake/kebab URL key formatters. Opt-in, so existing behaviour is unchanged. - Response ergonomics.
EnsureSuccessStatusCodeAsync()/EnsureSuccessfulAsync()are now available directly onIApiResponse<T>; a newIsSuccessfulWithContent(andHasContent) gives a single, mock-safe success-with-content check; nullable annotations onIApiResponse<T>were corrected to be sound. - URL and route control. Opt-in RFC 3986 / HttpClient-style URL resolution via
RefitSettings.UrlResolution, andRefitSettings.AllowUnmatchedRouteParametersto leave an unmatched{token}for aDelegatingHandlerto rewrite. - Faster JSON. A fast-path serialization option (
SystemTextJsonContentSerializer.GetFastPathJsonSerializerOptions()) and buffered/streamed request-body modes that run through it. - Smaller additions.
[Query(SerializeNull = true)]to send a null property askey=instead of omitting it, and a publicUniqueName.ForType<T>()to resolve the generatedIHttpClientFactoryclient name. - Fixes. Multipart
Guid/DateTime/DateTimeOffset/TimeSpan(andDateOnly/TimeOnly) are sent as plain text (#2016); property-level[Query(delimiter, prefix)]is honoured when flattening complex objects (#1334);[Query(Format = "")]serializes a complex value viaToString()(#1281); andIApiResponse<T>no longer shadows base members (#1933).
Breaking changes and migration
IApiResponse<T>no longer shadows base members. Thenew-shadowedError,ContentHeaders,IsSuccessStatusCode, andIsSuccessfulmembers are removed from the generic interface. Source that reads these still compiles (they bind to the inherited base members), but code compiled against v8-v11 that bound to the generic-interface slots needs a recompile. If you relied onIsSuccessfulto narrowContentto non-null on anIApiResponse<T>-typed value, switch toHasContent/IsSuccessfulWithContent.- The default
System.Text.Jsonserializer now reads numbers from JSON strings (NumberHandling = AllowReadingFromString). Opt back out withNumberHandling = JsonNumberHandling.Stricton yourJsonSerializerOptions.
🗞️ What's Changed
💥 Breaking Changes
- 8b70ca1 break: request-building fixes, JSON Lines, and response ergonomics (#2155) @glennawatson
- 3881cc6 break: add IAsyncEnumerable streaming and opt-in URL, route and JSON serialization modes (#2157) @glennawatson
✨ Features
- 6f2e43d feat: respect naming conventions across query, form and JSON body (#2154) @glennawatson
- 196cd49 feat: add IsSuccessfulWithContent and correct IApiResponse nullable annotations (#2159) @glennawatson
- e28a384 feat: generate request construction to avoid reflection pipeline (#2150) @glennawatson
- 98982b4 feat: reflection-free generated form serialization, opt-in null values, and public UniqueName (#2164) @glennawatson
- bf488d6 feat: improve generated clients for AOT (#2151) @glennawatson
♻️ Refactoring
- 3fd4ce6 refactor: replace System.Reactive with ReactiveUI.Primitives and integrate observable test helpers (#2152) @glennawatson
- c7c14b4 refactor: align Refit with rxui coding standards and modernize (#2149) @glennawatson
⚡ Performance
- 3717256 perf: modernize and optimize the Refit source generator (#2148) @glennawatson
🧹 General Changes
- 0aae034 build: update StyleSharp.Analyzers to 3.13.4 and align editorconfig (#2163) @glennawatson
🔗 Full Changelog: v11.2.0...v12.0.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
11.2.0
🗞️ What's Changed
🐛 Fixes
- 13882da fix: honor parameter-level CollectionFormat for inner collections (#2144) @glennawatson
- 54a8e62 fix: ValidationApiException propagates ContentHeaders and uses configured serializer (#2146) @glennawatson
- d694baf fix: populate ApiException.Content when deserialization fails (#2145) @glennawatson
🔗 Full Changelog: v11.1.0...v11.2.0
🙌 Contributions
💖 Thanks to all the contributors: @glennawatson
11.1.0
🗞️ What's Changed
🐛 Fixes
- be08706 Fix: serialize body by runtime type for interface/abstract parameters (#2118) (#2119) @HulinCedric
- d58ce5a fix: keep only baseline analyzer on legacy toolchains (#2136) @glennawatson
- 10ab2ce fix: handle empty responses and edge cases in JSON serialization (#2138) @ChrisPulman @glennawatson
- f9a24ab fix: clearer error when a response has no request message (#2141) @glennawatson
- 98868fa fix: detect nullable CancellationToken parameters (#2139) @glennawatson
- 7a3489e fix: correct URL and query string building edge cases (#2137) @glennawatson
- 8f9b460 fix: request building edge cases for headers, query and enum params (#2140) @glennawatson
🧹 General Changes
- 988d17a build: adopt central package management and modernize MSBuild (#2142) @glennawatson
📝 Documentation
- 2989a5e docs: Fix Refit 10 typo that should be Refit 11 (#2143) @PressXtoChris
📦 Dependencies
- b71c90c Update dotnet monorepo (#2123) @renovate[bot]
- b2e3c17 Update ASP.NET Core (#2122) @renovate[bot]
- 5f67752 chore(deps): update dotnet monorepo to v8 (#2130) @renovate[bot]
- 780979c Update Microsoft.Testing to 18.8.0 (#2126) @renovate[bot]
🔗 Full Changelog: v11.0.1...v11.1.0
🙌 Contributions
🌱 New contributors since the last release: @HulinCedric
💖 Thanks to all the contributors: @ChrisPulman, @glennawatson, @HulinCedric, @PressXtoChris
🤖 Automated services that contributed: @renovate[bot]