add required flag in annotation