class PropertyController {

	@GetMapping("/properties/{name}")
	public ResponseEntity<List<Map<String, String>>> get(@PathVariable String name) {
		
		List<Map<String, String>> result = new ArrayList<>();
		
		if("app-type".equals(name)) {
			result = Arrays.stream(AppType.values())
				.filter(item -> item.getKey().equals("01")) // 0.1.1 版本只支持 web
				.map(item -> {
					Map<String, String> map = new HashMap<String, String>();
					map.put("key", item.getKey());
					map.put("value", item.getLabel());
					map.put("icon", item.getIcon());
					return map;
				}).collect(Collectors.toList());
		}
		
		return ResponseEntity.ok(result);
		
	}

}