Releases: Respawnsive/Apizr
Releases · Respawnsive/Apizr
Apizr-v6.4.0
All
- [New][Authentication] Now
WithAuthenticationHandler
option provide many more overloads to fit more use cases, like property mapping, local methods, service methods, custom handler, etc. - [New][Authentication] Now
AuthenticationHandlerBase
does clone request Options as well as former Properties - [New][Authentication] Now
AuthenticationHandlerBase
performances and behavior have been improved by caching compiled factories and adjusting authentication flow - [Improvement][Authentication] Now
AuthenticationHandlerBase
with no token available fails fast by returning an Unauthorized response without actually sending the request - [Improvement/Fix][Authentication] Now
AuthenticationHandlerBase
does not clone anymore request with multipart content to prevent from memory leaks and stream issues - [Improvement/Breaking][Authentication] Now
AuthenticationHandlerBase
's GetToken & SetToken former methods upgraded to GetTokenAsync & SetTokenAsync so we could wait for it - [Improvement/Breaking][Authentication] Now
WithAuthenticationHandler
option's methods handle more parameters like HttpRequestMessage & CancellationToken - [Breaking][DelegatingHandler] Now
WithDelegatingHandler
,WithHttpMessageHandler
andWithAuthenticationHandler
provide a Logger within IApizrManagerOptionsBase single parameter - [Improvement][CacheKey] Now cache key generator extracts values from selected parameters only to improve performances
- [Fix][CacheKey] Now cache key generator handle parameters initialized right into the ExecuteAsync call as expected
- [Fix][CacheKey] Now POST methods returning a result could finally be data cached and key discriminated as expected
- [Fix][Config] Now configuration pipeline spreads options from common to request level as expected
- [Update][NuGet] Now Refit package reference has been updated to latest v8
- [Targets][NuGet] Now all Apizr packages are aligned with the same targeting frameworks as its referenced packages
Apizr.Extensions.Microsoft.DependencyInjection
- [New][Authentication] Now we can register a custom open generic authentication handler inheriting from
AuthenticationHandlerBase<TWebApi>
without needs of any instance factory. - [Update][NuGet] Now Refit.HttpClientFactory package reference has been updated to latest v8
Apizr.Integrations.Optional
- [Deprecated] Apizr.Integrations.Optional package has been deprecated as Optional.Async reference package is no longer maintained.
Apizr.Integrations.FileTransfer.Optional
- [Deprecated] Apizr.Integrations.FileTransfer.Optional package has been deprecated as Optional.Async reference package is no longer maintained.
Apizr-v6.4.0-preview.4
All
- [Improvement][Authentication] Now
AuthenticationHandlerBase
with no token available fails fast by returning an Unauthorized response without actually sending the request - [Breaking][DelegatingHandler] Now
WithDelegatingHandler
,WithHttpMessageHandler
andWithAuthenticationHandler
provide a Logger within IApizrManagerOptionsBase single parameter - [Targets][NuGet] Now all Apizr packages are aligned with the same targeting frameworks as its referenced packages
Apizr-v6.4.0-preview.3
All
- [Improvement][CacheKey] Now cache key generator extracts values from selected parameters only to improve performances
- [Fix][CacheKey] Now cache key generator handle parameters initialized right into the ExecuteAsync call as expected
- [Fix][Config] Now configuration pipeline spreads options from common to request level as expected
- [Update][NuGet] Now Refit package reference has been updated to latest v8
Apizr.Extensions.Microsoft.DependencyInjection
- [Update][NuGet] Now Refit.HttpClientFactory package reference has been updated to latest v8
Apizr-v6.4.0-preview.2
All
- [Improvement][Authentication] Now
AuthenticationHandlerBase
behavior has been improved by adjusting authentication flow - [Improvement/Breaking][Authentication] Now
WithAuthenticationHandler
option's methods handle more parameters like HttpRequestMessage & CancellationToken - [Fix][CacheKey] Now POST methods returning a result could finally be data cached and key discriminated as expected
Apizr-v6.4.0-preview.1
All
- [New][Authentication] Now
WithAuthenticationHandler
option provide many more overloads to fit more use cases, like property mapping, local methods, service methods, custom handler, etc. - [New][Authentication] Now
AuthenticationHandlerBase
does clone request Options as well as former Properties - [New][Authentication] Now
AuthenticationHandlerBase
performances has been improved by caching compiled factories - [Improvement/Breaking][Authentication] Now
AuthenticationHandlerBase
's GetToken & SetToken former methods upgraded to GetTokenAsync & SetTokenAsync as we can now wait for it
Apizr.Extensions.Microsoft.DependencyInjection
- [New][Authentication] Now we can register a custom open generic authentication handler inheriting from
AuthenticationHandlerBase<TWebApi>
without needs of any instance factory.
Apizr-v6.3.0
All
- [New][Exceptions] Now we can catch exceptions with a Func callback returning a Task of a handled boolean flag thanks to
WithExCatching
fluent option - [New][Exceptions] Now we can catch exceptions by providing a custom exception handler implementing
IApizrExceptionHandler
thanks toWithExCatching
fluent option - [New][ConfigureAwait] Now we can adjust Http handlers task awaiting configuration thanks to
ContinueOnCapturedContext
fluent option - [New][CacheKey] Now we can choose multiple complex type's properties to be included in cache key computation
- [Fix][CacheKey] Now providing a property name to the CacheKey attribute actually includes the property in cache key computation as expected
Apizr.Extensions.Microsoft.DependencyInjection
- [New][Exceptions] Now we can catch exceptions with a Func callback providing IServiceProvider and returning a Task of a handled boolean flag thanks to
WithExCatching
fluent option - [New][Exceptions] Now we can catch exceptions by resolving a custom exception handler implementing
IApizrExceptionHandler
thanks toWithExCatching
fluent option
Apizr-v6.2.0
All
- [New][Exceptions] Now we can catch exceptions with a Func callback returning a handled boolean flag thanks to
WithExCatching
fluent option - [New][Exceptions] Now we can check for a handled boolean flag right from the exception to adjust the handling behavior
- [New][Exceptions] Now we can let the exception throw even if it's yet been handled by registered handlers thanks to the
letThrowOnHandledException
parameter - [Deprecated][Exceptions] Now catching exceptions with an Action callback is deprecated in favor of the new Func one
- [Update][NuGet] Now all package references are up to date with the latest versions
- [Update][Doc] Now Doc website supports dark theme, larger code blocks and some other improvements
Apizr-v6.1.0
All
- [New][Cache] Now we can let the server control the client cache mode and lifetime thanks to the brand new
SetByHeader
cache mode (seeCache-Control
,Expires
,ETag
andLast-Modified
headers) - [New][Transfer] Now we can finally use the
ITransferApi<TDownloadParams>
shortcut api thanks to latest Refit updates - [Update][NuGet] Now all package references are up to date with the latest versions
Apizr-v6.0.0
All
- [New][Exceptions] Now we can handle
IApizrResponse
safe response (based on Refit'sIApiResponse
) instead of catching exceptions - [New][Configuration] Now we can configure Apizr thanks to
IConfiguration
from Microsoft.Extensions (e.g. from appsetings.json) - [New][Configuration] Now we can configure request options fluently at register time thanks to the brand new
WithRequestOptions
fluent option - [New][Refitter] Now we can generate all the boilerplate thanks to Refitter v1.2+ external package instead of the deprecated Apizr.Tools.NSwag one
- [New/Breaking][Polly] Now supporting only the brand new Polly v8+ Resilience Strategies/Pipelines/Registry instead of former Polly v7- Policies
- [New][Polly] Now we can set resilience pipelines to apply fluently to the request thanks to the brand new
WithResiliencePipelineKeys
fluent option - [New][Polly] Now we can scope resilience pipelines executions to specific http method groups thanks to the brand new
WithResiliencePipelineKeys's ApizrRequestMethod[]
optional parameter - [New][Polly] Now we can scope resilience pipelines executions to specific http method groups thanks to all brand new scoped
{RequestMethod}ResiliencePipeline
attributes likeGetResiliencePipeline
- [New][Cache] Now we can set caching options to apply fluently to the request thanks to the brand new
WithCaching
fluent option - [New][HttpTracer] Now we can filter out unwanted http message parts with the brand new
IgnoreMessageParts
fluent option - [New][HttpTracer] Now we can pick
RequestAllButBody
,HeadersOnly
,AllButRequestBody
,AllButResponseBody
orAllButBodies
http message parts when configuring logging options fluently or using attribute - [New][HttpTracer/Headers] Now we can redact any header sensitive values from logs at design time by surrounding header values with a
*
star symbol rigth into theHeaders
attribute - [New][HttpTracer/Headers] Now we can redact any header sensitive values from logs at register time thanks to
WithLoggedHeadersRedactionNames
orWithLoggedHeadersRedactionRule
fluent options - [New][Headers] Now we can choose to refresh a header value at request time or not, depending on the brand new
WithHeaders's ApizrLifetimeScope
optional parameter - [New][Headers] Now we can choose to set headers values straight to the request or store it for further headers attribute key match use, depending on the brand new
WithHeaders's ApizrRegistrationMode
optional parameter - [New][Headers] Now we can set headers values thanks to an expression tree
- [New][Attributes] Now we can provide types to attributes thanks to generic arguments instead of using typeof() as constructor parameters
- [New][DelegatingHandler] Now we can adjust the duplicate strategy while registering a DelegatingHandler
- [New][DelegatingHandler] Now we can register the extended way a DelegatingHandler by its type
- [New][HttpMessageHandler] Now we can register an HttpMessageHandler thanks to
WithHttpMessageHandler
fluent option - [New][HttpMessageHandler] Now we can register the extended way a HttpMessageHandler by its type
- [New][Cache] Now CacheKey attribute allows composite cache key generation from multiple decorated parameters
- [New][Registry] Now we can add multiple registry to the container and resolve a single merged one
- [New][BaseAddress/Path] Now we can set a base address or path with a duplicate strategy
- [New][Target] Now targeting multiple frameworks based on Refit targets:
netstandard2.0;netstandard2.1;net462;net6.0;net7.0;net8.0
- [New/Breaking][BaseAddress] Now we can set base address with the brand new
BaseAddress
attribure instead of the now removedWebApi
,CrudEntity
orMappedCrudEntity
useless ones, and only if you need to set it at design time - [New/Breaking][AutoRegister] Now we can tell Apizr to auto register apis with the brand new
AutoRegister
attribure instead of the now removedWebApi
,CrudEntity
orMappedCrudEntity
useless ones - [New/Breaking][MappedWith] Now we can tell Apizr to map data while using MediatR/Optional thanks to the yet known
MappedWith
attribure instead of the now removedCrudEntity
orMappedCrudEntity
useless ones - [Breaking][CacheMode] Now
CacheMode.GetAndFetch
enum option has been renamed toCacheMode.FetchOrGet
so that it says what it actually does and improve consistency with the otherCacheMode.GetOrFetch
option - [Breaking][Headers] Now WithHeaders options take an enumerable parameter instead of a parameter array so that we could provide some more optional parameters
- [Breaking][Removed] Previsoulsy deprecated extensions methods for backward compatibility have been removed as they were not suitable anymore
- [Breaking][DelegatingHandler] Now we can register DelegatingHandlers thanks to
WithDelegatingHandler
fluent option instead of theAddDelegatingHandler
deleted one for consistency. - [Fix][Cache] Now parameters decorated with
CacheKey
attribute are included no matter of position or index - [Fix][Cache] Parameter based cache keys are now allways computed to integrate value changes (skiping cachekey methodset)
- [Fix][Attributes] Now Apizr finally can get attributes decorating parent api interfaces or crud classes
- [Fix][Polly] Now Apizr wraps correctly resilience strategies, including typed result ones
- [Fix][Manager] ApizrManager has been optimized and refactored to improve performances
Apizr.Extensions.Microsoft.Caching
- [New] WithDistributedCacheHandler & WithInMemoryCacheHandler fluent shortcut options are now both available for single api registration too (no more limited to Registry)
- [Fix] Cache handlers now relies on content serializer to get xml serialization work too
- [Fix] Distributed cache handler serialization is now null protected to get it work without throwing exceptions
Apizr.Integrations.MediatR
- [New][Exceptions] Now we can send safe request returning an
IApizrResponse
response to handle (based on Refit'sIApiResponse
) instead of catching exceptions
Apizr.Integrations.FileTransfer
- [Fix] Now file data is no more logged by default while uploading or downloading
Apizr.Tools.NSwag
- [Deprecated] Apizr.Tools.NSwag is now deprecated and will be removed in a future version, please consider using Refitter (v1.2+) instead which now can generate all the Apizr (v6+) boilerplate and more.
Apizr-v6.0.0-preview.9
- [New][Resilience] Now we can use pre-configured pipeline from Microsoft Resilience packages
- [New][Priority] Now we can set priority from appsettings configuration
- [Breaking][CacheMode] Now
CacheMode.GetAndFetch
enum option has been renamed toCacheMode.FetchOrGet
so that it says what it actually does and improve consistency with the otherCacheMode.GetOrFetch
option