diff --git a/docs/source/development/further.md b/docs/source/development/further.md index 6daad4e6deae60e43a980ba3c49cb833c78bdce4..88292a3eda44e501d96e9e1b5b05d69b21ea0efc 100644 --- a/docs/source/development/further.md +++ b/docs/source/development/further.md @@ -1,11 +1,26 @@ # Further development Because the project was time limited a lot is left to be done. -A few ideas for things to be improved are given here. +Below we will give two different types things to improve. +The first type is functionality, bugs and aesthetics which improves the usability of the system. +The second type is refactoring which are basically just things related to the source code. +This won't effect the end user but certainly improves the system as a whole. -## Replacing reqparse +## Functionality, bugs and aesthetics -As mentioned in [Parsing request](../overview/server.html#parsing-request), the reqparse module from RestX is deprecated and should be replaced with for example marshmallow. -Parsing is a rather small and simple matter which makes it quite fine not to use the most optimal tool, but it should nevertheless be replaced. -This would also make it possible to generate better documentation by providing both the expected paramters and return value from an API. -This was looked into and deemed not trivial with the current solution. +Here we will list a few of things left to be done. + +## Refactoring + +Here we will give a list of things we think will improve the system. +It is not certain that they are a better solutions but definitely something to look into. + +### Replace Flask-RESTX with flask-smorest + +We currently use [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/) to define our endpoints and parse the arguments they take, either as a query string or in the body. +But when responding we use [Marshmallow](https://flask-smorest.readthedocs.io/en/latest/) to generate the JSON objects to return. +We believe that [flask-smorest](https://flask-smorest.readthedocs.io/en/latest/) would integrate a lot better with Marshmallow. +This would give us the ability to more easily show the expected arguments and the return values for our endpoints using Swagger (when visiting `localhost:5000`). +Currently we only show the route. +The work required also seems to be rather small because they look quite similar. +This would also remove the deprecated [reqparse](https://flask-restx.readthedocs.io/en/latest/parsing.html) part from Flask-RESTX, which is desirable.