Uses the json schema draft 6/7 keywords to better specify the restrictions on choice-type parameters, and adds tests