String refToName(String ref) { return ref .replaceFirst(RegExp(r'^#\/definitions\/'), '') .replaceAll(r'.', ""); }