Move schema decoration to own function