Helper to build json schema definitions