Skip to content
Snippets Groups Projects
Commit cf592864 authored by Theresia Rupprecht's avatar Theresia Rupprecht
Browse files

New: Add documentation for treeAPI(cosine/issues#1114)

parent 45321af9
No related branches found
No related tags found
1 merge request!7New: Add documentation for treeAPI(coscine/issues#1114)
...@@ -71,7 +71,7 @@ namespace Coscine.Api.Tree.Controllers ...@@ -71,7 +71,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary> /// </summary>
/// <param name="resourceId">Id of the resource</param> /// <param name="resourceId">Id of the resource</param>
/// <param name="path"> Path to file</param> /// <param name="path"> Path to file</param>
/// <returns></returns> /// <returns> Uri </returns>
public Uri GenerateId(string resourceId, string path) public Uri GenerateId(string resourceId, string path)
{ {
return new Uri($"https://hdl.handle.net/{_prefix}/{resourceId}@path={Uri.EscapeDataString(path)}"); return new Uri($"https://hdl.handle.net/{_prefix}/{resourceId}@path={Uri.EscapeDataString(path)}");
...@@ -82,7 +82,7 @@ namespace Coscine.Api.Tree.Controllers ...@@ -82,7 +82,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary> /// </summary>
/// <param name="resourceId"> Id of a resource</param> /// <param name="resourceId"> Id of a resource</param>
/// <param name="path">Path to the file</param> /// <param name="path">Path to the file</param>
/// <returns> JSon Object if ok, otherwise error</returns> /// <returns> JSon Object if ok, otherwise Statuscode 400 or 401 or 404</returns>
[HttpGet("[controller]/{resourceId}/{*path}")] [HttpGet("[controller]/{resourceId}/{*path}")]
public async Task<IActionResult> GetMetadata(string resourceId, string path) public async Task<IActionResult> GetMetadata(string resourceId, string path)
{ {
...@@ -149,7 +149,7 @@ namespace Coscine.Api.Tree.Controllers ...@@ -149,7 +149,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary> /// </summary>
/// <param name="resourceId">Id of the resource</param> /// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param> /// <param name="path">Path to the file</param>
/// <returns>No content, otherwise error</returns> /// <returns>No content, otherwise Statuscode 400 or 401 or 204</returns>
[HttpPut("[controller]/{resourceId}/{*path}")] [HttpPut("[controller]/{resourceId}/{*path}")]
public IActionResult StoreMetadataForFile(string resourceId, string path) public IActionResult StoreMetadataForFile(string resourceId, string path)
{ {
...@@ -269,7 +269,7 @@ namespace Coscine.Api.Tree.Controllers ...@@ -269,7 +269,7 @@ namespace Coscine.Api.Tree.Controllers
/// <param name="resourceId">Id of the resource</param> /// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param> /// <param name="path">Path to the file</param>
/// <param name="resource">Resource</param> /// <param name="resource">Resource</param>
/// <returns>null, otherwise error</returns> /// <returns>null, otherwise Statuscode 400 or 404 </returns>
private IActionResult CheckResourceIdAndPath(string resourceId, string path, out Resource resource) private IActionResult CheckResourceIdAndPath(string resourceId, string path, out Resource resource)
{ {
resource = null; resource = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment