New function to make JSON schemas from API schemas