Skip to content

Releases: go-goyave/goyave

Release v3.8.0

29 Apr 13:25
d32a3cf
Compare
Choose a tag to compare
  • Added helper.Map. Thanks to @agbaraka for the contribution!
  • Added router.Group, which is an alias for router.Subrouter(""), aimed at improving route definition readability.
  • Address generation outputs 127.0.0.1 if 0.0.0.0 is set as server host.
  • Added validation Rule.IsType() and Rule.IsTypeDependent().
  • Added route.BuildURI() to be able to generate a full URI without the host and protocol prefix.
  • Added various accessors for routes and routers.
  • Fixed timing attack on config basic authenticator.
  • Exported goyave.NewRouter().
  • Minor memory improvements by re-aligning some structure fields.
  • Added support for custom JWT claims. (jwt.GenerateTokenWithClaims()). Thanks to @Morishiri for the contribution!
  • Added JWTController.TokenFunc to let developers define their own token generation logic. Thanks to @Morishiri for the contribution!
  • Added support for RSA and ECDSA JWT signatures.
  • Added JWTAuthenticator.ClaimName. This field defines what is the name if the claim used as an ID.
  • JWTAuthenticator now adds token claims to request.Extra if the provided token is valid. (key: "jwt_claims")
  • JWTController.Login now returns 401 Unauthorized instead of 422 Unprocessable Entity if provided credentials are invalid.

Release v3.7.1

02 Mar 11:33
b14c6d0
Compare
Choose a tag to compare
  • Don't parse body if Content-Type is not set. Query params are still parsed. This change should drastically improve performance on requests with no body.
  • Set request.Data to nil (meaning parse failed) if query params couldn't be parsed.

Release v3.7.0

01 Mar 15:45
cbd8ae5
Compare
Choose a tag to compare
  • Added Optional flag to BasicAuthenticator and JWTAuthenticator.
  • Added support for database.options for the SQLite driver.
  • Added response.Hijack(). Therefore, *goyave.Response now implements http.Hijacker. Note that status handlers and middleware (requests finalization step in their lifecycle) will still work for hijacked connections.
  • Added websocket support.
  • Added shutdown hooks.
  • Added goyave.BaseURL().
  • Added config.LoadJSON(). This can be used to load configuration from an embedded configuration file using Go's 1.16 embed directive.
  • Static file serving will no longer print "no such file or directory" to the error logger.
  • Static file serving optimization: check file existence once instead of twice.

Release v3.6.0

21 Dec 14:02
b6d5ee5
Compare
Choose a tag to compare
  • Set content type to application/json; charset=utf-8 instead of application/json when using response.JSON().
  • Added default behavior for HEAD method: all GET routes can now match the HTTP HEAD method. This fixes 405 Method Not Allowed when requesting an URL with the HEAD method when no route explicitly matches the HEAD method. See the HEAD routing advice for more details.
  • Added request.ToStruct(), which puts the request's data into the given structure.

Release v3.5.0

12 Dec 13:28
989159b
Compare
Choose a tag to compare

Release v3.4.0

06 Nov 11:48
15d3077
Compare
Choose a tag to compare
  • Type-dependent rules validating integers (via the "integer" type rule) now share their validation message with the "numeric" type.
  • Added paginators.
  • Added helper.EscapeLike().
  • Performance improvement by caching critical config entries (protocol, maxUploadSize and defaultLanguage). This change leads to about 18% more requests per second. However, these entries cannot be dynamically changed anymore: a server restart will be needed.

Release v3.3.1

02 Nov 14:42
bc3996e
Compare
Choose a tag to compare
  • Fixed a bug in the validatior: the original value of type-converted fields was always used, leading to wrong validation of subsequent type-dependent rules.

Release v3.3.0

30 Oct 11:25
abbb50f
Compare
Choose a tag to compare
  • Added request.Extra. Thank you @gmgalvan for your contribution!
  • TestSuite now runs auto migrations if they're enabled before running the tests.
  • TestSuite don't load config anymore if it's already loaded. This allows you to load a test configuration file using LoadFrom() before calling goyave.RunTest().
  • response.JSON() doesn't remove hidden fields anymore. The use of json:"-" makes more sense and saves some execution time. Removing hidden fields manually is still possible.

Release v3.2.0

21 Oct 08:58
7a5f678
Compare
Choose a tag to compare
  • Added a way to customize the request's body field used by JWTController for the authentication process. (By default, "username" and "password" are used)
  • Added a new validation rule: unique.
  • Added helper.Only().
  • filesystem.File.Save() now creates directories if needed.

Release v3.1.0

21 Sep 15:53
5a6668f
Compare
Choose a tag to compare
  • Added support for validating objects (map[string]interface{}).
  • Added request.Object() accessor.