Future work - JulianPasquale/venmo-api GitHub Wiki
This project has a limited scope, but there is always time to mention some improves...
What about some better API docs? 📚
Maybe using gems link rswag for OpenAPI and Swagger docs... or rspec_api_documentation. There are many options that allow you to document the endpoints only by testing them with rspec
. And as another pro, you do not have to update docs every time you change your code 😇.
Some refactoring, of course 💯
- Would be nice to remove the
after_create
method inUser
class and build a service to create aUser
with his/herPaymentAccount
. It will make factories cleaner, but of course, the app must ensure that every user is created with an account. - Model validations:
- They can be moved to a concern, and then be reused by validators.
- Using a custom validator class, instead of methods in model. It will let models cleaner