Include ServerAPIVersion field in error message objects

This commit is contained in:
Jordan Brown
2018-08-13 14:04:29 -04:00
parent 30eca49e67
commit 061afdda10
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ namespace Tgstation.Server.Api
/// <summary>
/// The current <see cref="AssemblyName"/>
/// </summary>
static readonly AssemblyName assemblyName = Assembly.GetExecutingAssembly().GetName();
internal static readonly AssemblyName assemblyName = Assembly.GetExecutingAssembly().GetName();
/// <summary>
/// The <see cref="Models.Instance.Id"/> being accessed
@@ -1,4 +1,6 @@
namespace Tgstation.Server.Api.Models
using System;
namespace Tgstation.Server.Api.Models
{
/// <summary>
/// Represents an error message returned by the server
@@ -9,5 +11,10 @@
/// A human readable description of the error
/// </summary>
public string Message { get; set; }
/// <summary>
/// The version of the API the server is using
/// </summary>
public Version SeverAPIVersion { get; set; } = ApiHeaders.assemblyName.Version;
}
}