api: fixed return structure of validate metadata