Giraffe v2.0.0 Release Notes

Release Date: 2018-08-18 // over 5 years ago
  • ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”„ Changed the name of the handler requiresAuthPolicy to evaluateUserPolicy in order to better describe its functionality and to avoid a name clash between two newly added handlers for validating ASP.NET Core's AuthorizationPolicy objects (see new features).
    • ๐Ÿ”„ Changed how he AddGiraffe() extension method registers Giraffe dependencies in ASP.NET Core. It now follows the TryAdd pattern which will only register a dependency if it hasn't been registered beforehand.
    • ๐Ÿ”„ Changed the HttpContext.GetService<'T>() extension method to throw a MissingDependencyException 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). The authorizeByPolicyName and authorizeByPolicy http handlers will use ASP.NET Core's authorization service to validate a user against a given policy.
    • โšก๏ธ Updated TaskBuilder.fs to version 2.0.*.
    • โšก๏ธ Updated ASP.NET Core NuGet packages to latest 2.1.* versions.
    • Enabled return! for opt { } computation expressions.
    • Added blockquote, _integrity and _scoped to the GiraffeViewEngine.
    • โž• 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 the Giraffe.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 and subRoutef which prohibited to parse multiple GUIDs
    • ๐Ÿ›  Fixed a bug in routef, routeCif and subRoutef 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 the bindModel<'T> http handler to also bind to a model in the case of a PATCH or DELETE http request.