Releases: reactiveui/refit
Release list
14.0.1
🗞️ What's Changed
🐛 Fixes
- 132f72d fix(generator): support path and header bindings (#2281) @glennawatson
⚡ Performance
- 2f16caa perf: escape query components in place (#2277) @glennawatson @jgarciadelanoceda
- 6501f88 perf: Use String Interpolation In Code Generation (#2278) @glennawatson @jgarciadelanoceda
🔗 Full Changelog: v14.0.0...v14.0.1
🙌 Contributions
🌱 New contributors since the last release: @JavierGarciadelaNocedaArguelles
💖 Thanks to all the contributors: @glennawatson, @JavierGarciadelaNocedaArguelles, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda
14.0.0
Refit 14.0.0
Refit 14 is a major bug-fix and request-generation release. It fixes a broad set of correctness issues while completing the move to source-generated request building. Most clients can now build requests without runtime reflection, improving trimming, Native AOT support, startup time, and allocations.
What end users need to know
- Check RF006 warnings before upgrading. The reflection request builder has moved out of the main package. If any API method reports RF006, add the
Refit.Reflectionpackage. Fully generated clients should not add it. - Some async APIs now return
ValueTask. This affects the success-guard methods,DefaultApiExceptionFactory.CreateAsync, and severalRefitSettingsdelegates. Most callers can continue toawaitthem; code that stores aTaskmay need.AsTask(). - A few request-building behaviours are intentionally different. Query objects are flattened from their declared type, serializer property names are honoured in query keys, and nested URL-encoded objects are flattened instead of using
ToString(). - Caller-owned streams remain open. Refit no longer disposes streams supplied as request bodies or multipart parts; callers are responsible for disposing them.
- Validation timing can change. Fully generated interfaces validate route templates when the first request is built rather than when the client is created. Generated method frames also no longer appear in
ApiExceptionstack traces. - Empty authorization tokens now omit the header. Returning null, empty, or whitespace from
AuthorizationHeaderValueGetterno longer sends a blankAuthorizationheader.
Major fixes
- Request generation now handles multiple generic overloads, escaped C# keyword identifiers, nullable value-type query objects, nested URL-encoded bodies, and indexed query collections correctly.
- Caller-supplied request streams can be reused, generated helper types no longer collide across
InternalsVisibleToassemblies, and null parameter values round-trip correctly.
Highlights
- New request controls include
[PathPrefix], per-method[Timeout], absolute URLs with[Url], optional route segments, indexed query collections, header validation, and returning a builtHttpRequestMessagewithout sending it. - Query objects, dictionaries, generic methods, multipart form objects, and custom return-type adapters gain broader reflection-free generation.
- Server-Sent Events can be consumed as
IAsyncEnumerable<T>, and transport exceptions can be customized withTransportExceptionFactory. - Runtime, reflection, and source-generator allocation reductions improve throughput; source generation is roughly twice as fast in the measured workload.
See the V14 migration details and complete feature documentation.
🗞️ 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
- 65f864e feat: only generate
AttributeProviderfield when not empty (#2271) @TimothyMakkison - 99c055b feat: support optional url segments with {name?} syntax (#2237) @glennawatson
- 759a3c0 feat: support returning the built HttpRequestMessage without sending (#2235) @glennawatson
- 88d5e68 feat: add CollectionFormat.Indexed for indexed query collection expansion (#2262) @Copilot @glennawatson @jgarciadelanoceda
- 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 @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
♻️ Refactoring
- aa2229b refactor: resolve analyzer diagnostics across solution (#2268) @ChrisPulman
🐛 Fixes
- 8e4237b fix:Analyzer false positive on Indexed CollectionFormat (#2274) @jgarciadelanoceda
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 71634f2 fix: escape keyword identifiers in generated interface member names (#2248) @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
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- 147282a perf: replace
StringBuilderwithValueStringBuilderinRoundTripEscapePath(#2253) @TimothyMakkison - b193498 perf: replace
StringBuilderwithValueStringBuilder(#2270) @TimothyMakkison - eb92914 perf: call
PooledStringBuilderdirectly and removeConcatPartsandJoinParts(#2275) @TimothyMakkison - b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison - 8382bed perf: reduce Refit.Reflection memory allocations (#2267) @glennawatson
- fc06c57 perf: check for
allowUnmatchedParameterbefore callingIndexOf(#2252) @TimothyMakkison - f24d171 perf: wrap helper methods in
MethodImplOptions.AggressiveInlining(#2260) @TimothyMakkison - 8cea3f1 perf: reduce runtime Refit memory allocations (#2263) @glennawatson
- 5dcfcc9 perf: cut source generator allocations and roughly halve generation time (#2259) @glennawatson
🧹 General Changes
- 44f81de ci: gate native AOT smoke test via shared reusable workflow (#2244) @glennawatson
- a9932f8 chore: enable 1000 lines for real @glennawatson
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
- 8cc1c37 chore: Relax number of file lines to 1000 lines instead of 500 @glennawatson
✅ Tests
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @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...
14.0.0-beta.5
🗞️ What's Changed
💥 Breaking Changes
- e511df2 feat!: reflection-free source-generated request building (#2210) @glennawatson @TimothyMakkison
✨ Features
- 65f864e feat: only generate
AttributeProviderfield when not empty (#2271) @TimothyMakkison - 88e1c24 feat: add generic tests to
ReflectionTests(#2195) @TimothyMakkison - 463f5cf feat: add [Timeout] attribute for per-method request timeouts (#2238) @glennawatson
- 88d5e68 feat: add CollectionFormat.Indexed for indexed query collection expansion (#2262) @Copilot @glennawatson @JaviergarcíadelaNocedaArgüelles @jgarciadelanoceda
- 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
♻️ Refactoring
- aa2229b refactor: resolve analyzer diagnostics across solution (#2268) @ChrisPulman
🐛 Fixes
- 809de10 fix: do not dispose caller-supplied request streams (#2234) @glennawatson
- 71634f2 fix: escape keyword identifiers in generated interface member names (#2248) @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
- 02a037b fix: flatten nested objects in url-encoded request bodies (#2224) @glennawatson
⚡ Performance
- b575c9d perf:
AllAttributesCachereplaceLazywith laziliy initialised code (#2211) @TimothyMakkison - b193498 perf: replace
StringBuilderwithValueStringBuilder(#2270) @TimothyMakkison - 8382bed perf: reduce Refit.Reflection memory allocations (#2267) @glennawatson
- 8cea3f1 perf: reduce runtime Refit memory allocations (#2263) @glennawatson
- 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
- 393b245 ci: add alpha/beta/rc pre-release channel to release workflow @glennawatson
- ddc42c9 build: upgrade StyleSharp/PerformanceSharp analyzers to 3.26.0 (#2227) @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
- a9932f8 chore: enable 1000 lines for real @glennawatson
✅ Tests
- e67c5c4 test: cover TransportExceptionFactory cancellation and timeout behavior (#2203) @arpitjain099 @glennawatson
- e5da8b8 test: reach 100% product code coverage (#2243) @glennawatson
- 865d0f2 test(refit.testing): cover retry and timeout scenarios (#2208) @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]
- cf77d87 chore(deps): update dependency verify.tunit to 31.27.0 (#2269) @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]
- b920e21 chore(deps): update actions/setup-dotnet action to v6 (#2251) @renovate[bot]
🔗 Full Changelog: v13.1.0...v14.0.0-beta.5
🙌 Contributions
🌱 New contributors since the last release: @arpitjain099, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @rmja
💖 Thanks to all the contributors: @arpitjain099, @ChrisPulman, @Copilot, @glennawatson, @JaviergarcíadelaNocedaArgüelles, @jgarciadelanoceda, @rmja, @TimothyMakkison
🤖 Automated services that contributed: @renovate[bot]
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]