Some crazyness to convert json schema refs