Closed kirypto closed 2 years ago
To add to this, if the Rest<Entity>RequestHandler
classes could return a Set[Tuple[<route>, <http method>, <handler function>]]
. This way the flask controllers could be simplified to iterating across the set and setup corresponding handlers. A little extra may be necessary to tie in whether or not the json should be extracted and passed through.
<Entity>RequestHandler
methods return aTuple[str, Callable]
or similar so that the RestHandler can return the route as well as the method for accessing it.<Entity>RequestHandler
can likely be combined back into theRest<Entity>RequestHandler
, as it is not needed with the latter in the application layer.