Open VakarisZ opened 1 year ago
We can't remove manual registration of resources all over the codebase because of the DI container. With the exception of the authentication resources, all the add_resource
methods are being called on the FlaskDIWrapper
object. We can probably only leverage this for the authentication resources.
Refactor
As more code gets segregated into modules on the island side, we can use blueprints to leverage registration of URL's for those modules. Blueprints can improve code quality in the following ways:
register_resources
methods all over the codebase (they are not even part of an interface, so they need to be called manually for each island module we create)./auth
and all resources registered from it will start with/auth
. This would ease refactoring in case we want to refactor the URL structure and for example remove the/api
in the beginning of urls. Now we would need to go through every single endpoint and change the url string.Component(s) to be refactored
Resource URL's, resource registration
Explanation