Project

General

Profile

« Previous | Next » 

Revision 54556

refactoring and addition of lastupdatedate field in the json.
the value for the field creationDate of the json is found in the context parameter with name creationdate

View differences:

CommunityApiController.java
1 1
package eu.dnetlib.openaire.community;
2 2

  
3
import java.io.IOException;
3 4
import java.util.List;
4 5

  
5 6
import io.swagger.annotations.ApiOperation;
......
20 21
	@Autowired
21 22
	private CommunityApiCore communityApiCore;
22 23

  
24

  
23 25
	@RequestMapping(value = "/community/communities", produces = { "application/json" }, method = RequestMethod.GET)
24 26
	@ApiOperation(
25 27
			value = "get all community profiles",
......
227 229
			@ApiResponse(code = 200, message = "OK"),
228 230
			@ApiResponse(code = 404, message = "not found", response = CommunityNotFoundException.class),
229 231
			@ApiResponse(code = 500, message = "unexpected error", response = CommunityException.class) })
230
	public void removeCommunityZenodoCOmmunity(
232
	public void removeCommunityZenodoCommunity(
231 233
			@PathVariable final String id,
232 234
			@RequestBody final Integer  zenodoCommId) throws CommunityException, CommunityNotFoundException {
233 235

  
234 236
		communityApiCore.removeCommunityZenodoCommunity(id, zenodoCommId);
235 237

  
236 238
	}
239

  
240

  
241
	@RequestMapping(value = "/community/{zenodoId}/openairecommunities", produces = { "application/json" }, method = RequestMethod.GET)
242
	@ApiOperation(
243
			value = "get the list of OpenAIRE communities associated to a given Zenodo community",
244
			notes = "get the list of OpenAIRE communities associated to a given Zenodo community",
245
			tags = { C_ZC, R })
246
	@ApiResponses(value = {
247
			@ApiResponse(code = 200, message = "OK"),
248
			@ApiResponse(code = 404, message = "not found", response = CommunityNotFoundException.class),
249
			@ApiResponse(code = 500, message = "unexpected error", response = CommunityException.class) })
250
	public List<String> getOpenAireCommunities(
251
			@PathVariable final String zenodoId) throws  IOException {
252

  
253
		return communityApiCore.getOpenAIRECommunities(zenodoId);
254

  
255
	}
237 256
}

Also available in: Unified diff