Absence of NotNull or NotEmpty checks for legal field in storage record causing issues
The legal field in storage record has no NotNull or NotEmpty validations for it.
This is causing issue if a user try to create a storage record without passing legal in the request payload. In storage service, the legal field of record is accessed(for example this) and if it's null, a null pointer exception is thrown which ultimately results in 500 Internal Server Error response.
Putting up NotNull/NotEmpty validations for legal will ensure that we throw 400 response with right message in case if legal is not passed in input request payload. Just like we have NotNull validation for acl in storage record (check this), we can have same validation for legal too.