Ensure submodel middleware is used in RestAPI.middleware

Signed-off-by: Ian Macalinao <me@ian.pw>