Add "resources" section to document only if it's not empty
Made resources reference of Blob optional