Closed wmnnd closed 2 years ago
This PR now includes APIs for managing Contacts, Campaigns, and Segments and I think it’s a good starting point. I would be very happy about some feedback @panoramix360 & @gbottari :smiley:
I'll try to look into it tomorrow :D
The purpose of this PR is to enable Keila to be integrated with other backends, right? Really nice :D
Some ideas or thoughts in general:
normalizer.ex
in more parts to separate the concern for each API, in this way we can define more normalizers for each route without mixing all the logic together.api_controller.ex
in the futureapi_view.ex
can be a good idea to maintain the structure.api_controller.ex
methods can be a good way to document the structure of the requests like the body and response.delete_batch
to contacts to delete a list of contacts by id could be nice.I wrote some comments on your code, but sorry for putting too many haha :)
Feel free to let me know what do you think \o
Those are some very good points! I think I’ll try refactoring the code a bit, including special Schema modules and something to create OpenAPI schemas.
Updated PR with OpenAPI will hopefully be done tomorrow :partying_face:
Thanks so much for your valuable feedback, @panoramix360! I have now done an extensive refactoring of the API controllers, making them much more modular, and adding Open API specs :partying_face:
I'm glad that it helped :D
I'll look for your modifications on this week :tada:
Implementation of #75