We need to check the request against a known schema before proceeding with them.
The following works (unfortunately):
- Send a Create a new expense request, but omit the "title" attribute.
- Observe that
- The request succeeds
- When Getting an expense with the received ID, the title is empty
- It is actually empty in the database
- The value of that attribute in the DTO class is actually
null.
Suggested fix:
Create a schema we can check against.
or
Create a instance method checking all fields are populated.
We need to check the request against a known schema before proceeding with them.
The following works (unfortunately):
null.Suggested fix:
Create a schema we can check against.
or
Create a instance method checking all fields are populated.