~~~~~~~~~~~~~~~~~~
New Features:
* New field `DocumentField`, behaves like a Mongo-like document, any key and
any value will do, as long as they can be json serialised. (Note: there is
already a mechanism to define how to serialise complex objects). Helps if
response is document without fixed structure. Previously developer was
forced to use raw response and had no support of framework with validation.
* New methods to override on endpoints pre_action and post_action, pre_action
allows to manipulate endpoint before anything happens, post_action
allows to manipulate result before it's being send to the end user, typical
use case is optional header that alters how endpoint works (ie
authentication) or adding custom headers to the response
* Auth models have new method is_authorised that return true/false
* New exception AccessForbiden and default handling of it, simplest use case
is to import it in your project and raise, to do http status code 403
Removed Features:
* Auth and storage was removed from framework. As many projects out there, as
many methods of authenticating. Magicarp mission is help with problems that
are more or less always solved one way, not to have myriad of settings
options, that each of them almost work but not really for this typical use
case. Current go-to solution is providing `register_auth` function to
create_app and providing endpoint that will work with it. For that reason
redis and dummy storage was removed as not every app will require
persistence and it was introduced to handle user authentication.
* As Auth ceased to exist so did AuthorizedTestUser, feature that can be
implemented number of ways and is like auth dependent on developers taste
and need
* Due to auth no longer being part of magicarp, setting ROUTING_ADD_AUTH was
dropped
Bug Fixes:
* When ROUTING_ADD_COMMON and ROUTING_ADD_AUTH was False, bug prevented
registering any other version-less endpoint
* When attempting to register second endpoint with same name as the first one,
magicarp was attempting to raise exception DuplicateRouteException, this
exception was reimplemented + clarified a bit text message
* endpoint that was added to blueprint not as an instance was incorrectly
displaying help (taken on default from docstring), instantiate all endpoints
prior to be added to routing (developer can add endpoint as either class or
instance)
Breaking Compatibility:
* default map endpoint started to use new schema Map (behaves the same)
* add ROUTING_ADD_SHUTDOWN_ROUTE as an explicit way to add endpoint that
allows remotely to shtudown a server, helpful if we want to stop server
execution programatically via test runners or bots, it's niche requirements
and potentially dangerous and thus should be on default False