Routing Component Integration
New Dependencies
Removed Dependencies
- Athena no longer depends on/requires https://github.com/amberframework/amber-router
Additions
- Allow prepending HTTP::Handlers to the Athena server by @Blacksmoke16 in athena-framework/athena#133
- Add additional ATH::Spec::APITestCase methods for common REST methods (get, post, put, delete) by @Blacksmoke16 in athena-framework/athena#134
- Add an overload of ATH::Spec::APITestCase#request that accepts a request object, either HTTP::Request or ATH::Request by @Blacksmoke16 in athena-framework/athena#134
- Allow passing an OpenSSL::SSL::Context::Server to ATH.run to run an HTTPS server by @Blacksmoke16 in athena-framework/athena#135
- Add ATH::ParameterBag#set(hash) that allows setting a hash of key/value pairs by @Blacksmoke16 in athena-framework/athena#141
Changes
- (breaking-change) Integrate the Athena::Routing component by @Blacksmoke16 in athena-framework/athena#141
-
@[ATHA::Prefix(prefix: "/foo")]
=>@[ARTA::Route(path: "/foo")]
- Prefixes no longer check parent types. Define a single
ARTA::Route
with the prefix on each controller
- Prefixes no longer check parent types. Define a single
-
ATHA::*
routing annotations have been replaced withARTA::*
routing annotations -
The route path now takes trailing slashes into consideration
/foo
is a diff route when compared to/foo/
-
The parameter syntax now uses
{}
"/foo/:id/bar"
=>"/foo/{id}/bar"
-
The
constraints
route annotation field is now calledrequirements
-
The
method
route annotation field is now calledmethods
-
The default scheme when generating routes is now
http
when no base_uri is set -
ATH::Exceptions::MethodNotAllowed now requires an array of valid methods as its first argument
-
Route duplication detection now solely takes the controller action name into consideration
-
Subclassing
ATH::Request
is no longer supported -
(breaking-change) Remove
#name
,#path
,#method
, and#constraints
from ATH::Action
-
Fixes
- Use
https
in startup log message when SSL context is set by @Blacksmoke16 in athena-framework/athena#136