moved schema and model definition outside post request