@Test public void all() throws Exception { when(zoneService.listCitizenZones()).thenReturn(asList(zoneDefault("xyz"))); oauthPerform(user, get("/v1/zone/all")).andExpect(status().isOk()) .andExpect(jsonPath("$.data[0].name", is("xyz"))); }
@ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) public List<V1ZoneDto> all(ClientAppUserAccessToken token) { return zoneService.listCitizenZones().stream().map(ZoneInfo::toV1Dto).collect(toList()); }
V1ZoneResource { @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) public List<V1ZoneDto> all(ClientAppUserAccessToken token) { return zoneService.listCitizenZones().stream().map(ZoneInfo::toV1Dto).collect(toList()); } }
V1ZoneResource { @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) public List<V1ZoneDto> all(ClientAppUserAccessToken token) { return zoneService.listCitizenZones().stream().map(ZoneInfo::toV1Dto).collect(toList()); }  }
V1ZoneResource { @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) public List<V1ZoneDto> all(ClientAppUserAccessToken token) { return zoneService.listCitizenZones().stream().map(ZoneInfo::toV1Dto).collect(toList()); }  @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) List<V1ZoneDto> all(ClientAppUserAccessToken token); @ApiOperation(value = "[public] List administrators of the zone", notes = "List username of administrators of the zone") @RequiredScope(PUBLIC) @RequestMapping(value = "/{zone}/administrator/username", method = RequestMethod.GET) List<String> listAdministrators(ClientAppUserAccessToken token,
      @PathVariable("zone") String zone); }
V1ZoneResource { @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) public List<V1ZoneDto> all(ClientAppUserAccessToken token) { return zoneService.listCitizenZones().stream().map(ZoneInfo::toV1Dto).collect(toList()); }  @ApiOperation(value = "[public] List all zones", notes = "List all available zones.") @RequiredScope(PUBLIC) @RequestMapping(value = "/all", method = RequestMethod.GET) List<V1ZoneDto> all(ClientAppUserAccessToken token); @ApiOperation(value = "[public] List administrators of the zone", notes = "List username of administrators of the zone") @RequiredScope(PUBLIC) @RequestMapping(value = "/{zone}/administrator/username", method = RequestMethod.GET) List<String> listAdministrators(ClientAppUserAccessToken token,
      @PathVariable("zone") String zone);  }