Giraffe v2.0.0 Release Notes
Release Date: 2018-08-18 // over 5 years ago-
๐ฅ Breaking changes
- ๐ Changed the name of the handler
requiresAuthPolicy
toevaluateUserPolicy
in order to better describe its functionality and to avoid a name clash between two newly added handlers for validating ASP.NET Core'sAuthorizationPolicy
objects (see new features). - ๐ Changed how he
AddGiraffe()
extension method registers Giraffe dependencies in ASP.NET Core. It now follows theTryAdd
pattern which will only register a dependency if it hasn't been registered beforehand. - ๐ Changed the
HttpContext.GetService<'T>()
extension method to throw aMissingDependencyException
if it cannot resolve a desired dependency.
๐ New features
- โ Added two new http handlers to validate an ASP.NET Core
AuthorizationPolicy
(see: Policy based authorization). TheauthorizeByPolicyName
andauthorizeByPolicy
http handlers will use ASP.NET Core's authorization service to validate a user against a given policy. - โก๏ธ Updated
TaskBuilder.fs
to version2.0.*
. - โก๏ธ Updated ASP.NET Core NuGet packages to latest
2.1.*
versions. - Enabled
return!
foropt { }
computation expressions. - Added
blockquote
,_integrity
and_scoped
to theGiraffeViewEngine
. - โ Added attributes for mouse, keyboard, touch, drag & drop, focus, input and mouse wheel events to the
GiraffeViewEngine
. - โ Added new accessibility attributes to the
GriaffeViewEngine
. These can be used after opening theGiraffe.GiraffeViewEngine.Accessibility
module. - โ Added a new
Successful.NO_CONTENT
http handler which can be used to return a HTTP 204 response. - โ Added more structured logging around the Giraffe middleware.
๐ Bug fixes
- ๐ Fixed a bug in
routef
,routeCif
andsubRoutef
which prohibited to parse multiple GUIDs - ๐ Fixed a bug in
routef
,routeCif
andsubRoutef
which wrongly decoded a route argument twice (and therefore turned+
signs into spaces). - ๐ Fixed XML documentation for all Giraffe functions which should make function tooltips nicely formatted again.
- Enabled the
HttpContext.BindModelAsync<'T>()
extension method and thebindModel<'T>
http handler to also bind to a model in the case of aPATCH
orDELETE
http request.
- ๐ Changed the name of the handler