diff --git a/build/Version.props b/build/Version.props
index a53842da56..004258e666 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -6,12 +6,13 @@
5.0.4
4.2.0
9.6.0
- 9.6.1
- 10.7.1
+ 10.0.0
+ 11.0.0
6.0.5
5.3.0
1.2.0
1.2.0
+ 1.0.0
net6.0
diff --git a/src/Tgstation.Server.Api/ApiHeaders.cs b/src/Tgstation.Server.Api/ApiHeaders.cs
index 349522be7f..0ad8c7a487 100644
--- a/src/Tgstation.Server.Api/ApiHeaders.cs
+++ b/src/Tgstation.Server.Api/ApiHeaders.cs
@@ -50,6 +50,11 @@ namespace Tgstation.Server.Api
///
public const string OAuthAuthenticationScheme = "OAuth";
+ ///
+ /// Added to in netstandard2.1. Can't use because of Tgstation.Server.Migrator.
+ ///
+ public const string ApplicationJsonMime = "application/json";
+
///
/// Get the version of the the caller is using.
///
@@ -167,9 +172,9 @@ namespace Tgstation.Server.Api
errorBuilder.Append(message);
}
- var jsonAccept = new Microsoft.Net.Http.Headers.MediaTypeHeaderValue(MediaTypeNames.Application.Json);
+ var jsonAccept = new Microsoft.Net.Http.Headers.MediaTypeHeaderValue(ApplicationJsonMime);
if (!requestHeaders.Accept.Any(x => jsonAccept.IsSubsetOf(x)))
- AddError(HeaderTypes.Accept, $"Client does not accept {MediaTypeNames.Application.Json}!");
+ AddError(HeaderTypes.Accept, $"Client does not accept {ApplicationJsonMime}!");
if (!requestHeaders.Headers.TryGetValue(HeaderNames.UserAgent, out var userAgentValues) || userAgentValues.Count == 0)
AddError(HeaderTypes.UserAgent, $"Missing {HeaderNames.UserAgent} header!");
@@ -306,7 +311,7 @@ namespace Tgstation.Server.Api
throw new InvalidOperationException("Specified different instance IDs in constructor and SetRequestHeaders!");
headers.Clear();
- headers.Accept.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
+ headers.Accept.Add(new MediaTypeWithQualityHeaderValue(ApplicationJsonMime));
headers.UserAgent.Add(new ProductInfoHeaderValue(UserAgent));
headers.Add(ApiVersionHeader, new ProductHeaderValue(AssemblyName.Name, ApiVersion.ToString()).ToString());
if (OAuthProvider.HasValue)
diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
index a16a93ebed..7f275db48d 100644
--- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
+++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
@@ -2,7 +2,7 @@
- netstandard2.1
+ netstandard2.0
Full
$(TgsApiLibraryVersion)
true
@@ -16,7 +16,7 @@
https://github.com/tgstation/tgstation-server
2018-2022
json web api tgstation-server tgstation ss13 byond
- See https://github.com/tgstation/tgstation-server/releases/tag/api-v$(TgsApiVersion)
+ Retargeted to netstandard2.0 to support migrator.
true
snupkg
../../build/analyzers.ruleset
diff --git a/src/Tgstation.Server.Client/ApiClient.cs b/src/Tgstation.Server.Client/ApiClient.cs
index fac48c439a..36344c265f 100644
--- a/src/Tgstation.Server.Client/ApiClient.cs
+++ b/src/Tgstation.Server.Client/ApiClient.cs
@@ -26,6 +26,12 @@ namespace Tgstation.Server.Client
///
sealed class ApiClient : IApiClient
{
+ ///
+ /// PATCH .
+ ///
+ /// HOW IS THIS NOT INCLUDED IN THE FRAMEWORK??!?!?
+ static readonly HttpMethod HttpPatch = new ("PATCH");
+
///
public Uri Url { get; }
@@ -77,7 +83,7 @@ namespace Tgstation.Server.Client
/// Get the to use.
///
/// A new instance.
- static JsonSerializerSettings GetSerializerSettings() => new JsonSerializerSettings
+ static JsonSerializerSettings GetSerializerSettings() => new ()
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Converters = new[] { new VersionConverter() },
@@ -171,7 +177,7 @@ namespace Tgstation.Server.Client
public Task Update(string route, TBody body, CancellationToken cancellationToken) where TBody : class => RunRequest(route, body, HttpMethod.Post, null, false, cancellationToken);
///
- public Task Patch(string route, CancellationToken cancellationToken) => RunRequest