Skip to content
Snippets Groups Projects
Commit 73825076 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Small changes (coscine/issues#1114)

parent cf592864
No related tags found
1 merge request!7New: Add documentation for treeAPI(coscine/issues#1114)
......@@ -66,6 +66,7 @@ namespace Coscine.Api.Tree.Controllers
_blobApiLink = $"https://{host}{path}/blob/";
_prefix = Program.Configuration.GetStringAndWait("coscine/global/epic/prefix");
}
/// <summary>
/// Generates Id
/// </summary>
......@@ -82,7 +83,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// <param name="resourceId"> Id of a resource</param>
/// <param name="path">Path to the file</param>
/// <returns> JSon Object if ok, otherwise Statuscode 400 or 401 or 404</returns>
/// <returns> JSON Object with the metadata if ok, otherwise Statuscode 400 or 401 or 404</returns>
[HttpGet("[controller]/{resourceId}/{*path}")]
public async Task<IActionResult> GetMetadata(string resourceId, string path)
{
......@@ -136,7 +137,7 @@ namespace Coscine.Api.Tree.Controllers
var jObject = new JObject(
new JProperty("data", new JObject(
new JProperty("metadataStorage", JToken.FromObject(graphs)),
new JProperty("fileStorage", JToken.FromObject(infos.Select( x => new ObjectMetaInfoReturnObject(x, _blobApiLink, resource.Id.ToString()))))
new JProperty("fileStorage", JToken.FromObject(infos.Select(x => new ObjectMetaInfoReturnObject(x, _blobApiLink, resource.Id.ToString()))))
))
);
......@@ -149,7 +150,7 @@ namespace Coscine.Api.Tree.Controllers
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path">Path to the file</param>
/// <returns>No content, otherwise Statuscode 400 or 401 or 204</returns>
/// <returns>If ok Statuscode 204, otherwise Statuscode 400 or 401</returns>
[HttpPut("[controller]/{resourceId}/{*path}")]
public IActionResult StoreMetadataForFile(string resourceId, string path)
{
......@@ -316,7 +317,7 @@ namespace Coscine.Api.Tree.Controllers
/// Gets the name of the resource type
/// </summary>
/// <param name="resource">Resource</param>
/// <returns> Rds</returns>
/// <returns> Processed name of the resource </returns>
private string GetResourceTypeName(Resource resource)
{
if (resource.Type.DisplayName.ToLower().Equals("s3"))
......
......@@ -43,7 +43,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Coscine.Api.Tree.xml</DocumentationFile>
<DocumentationFile>bin\Release\Coscine.Api.Tree.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Consul, Version=0.7.2.6, Culture=neutral, PublicKeyToken=20a6ad9a81df1d95, processorArchitecture=MSIL">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment