mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Merge branch 'master' into patch-1
This commit is contained in:
+2
-2
@@ -2,9 +2,9 @@
|
||||
<PropertyGroup>
|
||||
<!-- This is the authorative version list -->
|
||||
<!-- Integration tests will ensure they match across the board -->
|
||||
<TgsCoreVersion>4.4.4</TgsCoreVersion>
|
||||
<TgsCoreVersion>4.4.5</TgsCoreVersion>
|
||||
<TgsConfigVersion>2.0.0</TgsConfigVersion>
|
||||
<TgsApiVersion>7.2.1</TgsApiVersion>
|
||||
<TgsApiVersion>7.2.3</TgsApiVersion>
|
||||
<TgsClientVersion>8.2.0</TgsClientVersion>
|
||||
<TgsDmapiVersion>5.2.3</TgsDmapiVersion>
|
||||
<TgsControlPanelVersion>0.4.0</TgsControlPanelVersion>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "3.1.5",
|
||||
"version": "3.1.7",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
/// </summary>
|
||||
/// <param name="fromDiscord">The mention <see cref="string"/> provided by the Discord library</param>
|
||||
/// <returns>The normalized mention <see cref="string"/></returns>
|
||||
static string NormalizeMentions(string fromDiscord) => fromDiscord.Replace("<!@", "<@", StringComparison.Ordinal);
|
||||
static string NormalizeMentions(string fromDiscord) => fromDiscord.Replace("<@!", "<@", StringComparison.Ordinal);
|
||||
|
||||
/// <summary>
|
||||
/// Construct a <see cref="DiscordProvider"/>
|
||||
|
||||
@@ -374,7 +374,7 @@ namespace Tgstation.Server.Host.Controllers
|
||||
/// <response code="409">An IO error occurred while downloading.</response>
|
||||
[HttpGet(Routes.Logs + "/{*path}")]
|
||||
[TgsAuthorize(AdministrationRights.DownloadLogs)]
|
||||
[ProducesResponseType(typeof(List<LogFile>), 200)]
|
||||
[ProducesResponseType(typeof(LogFile), 200)]
|
||||
[ProducesResponseType(typeof(ErrorMessage), 409)]
|
||||
public async Task<IActionResult> GetLog(string path, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
@@ -128,7 +128,18 @@ namespace Tgstation.Server.Host.Core
|
||||
new OpenApiInfo
|
||||
{
|
||||
Title = "TGS API",
|
||||
Version = ApiHeaders.Version.Semver().ToString()
|
||||
Version = ApiHeaders.Version.Semver().ToString(),
|
||||
License = new OpenApiLicense
|
||||
{
|
||||
Name = "AGPL-3.0",
|
||||
Url = new Uri("https://github.com/tgstation/tgstation-server/blob/dev/LICENSE")
|
||||
},
|
||||
Contact = new OpenApiContact
|
||||
{
|
||||
Name = "/tg/station 13",
|
||||
Url = new Uri("https://github.com/tgstation")
|
||||
},
|
||||
Description = "A production scale tool for BYOND server management"
|
||||
});
|
||||
|
||||
// Important to do this before applying our own filters
|
||||
@@ -136,6 +147,9 @@ namespace Tgstation.Server.Host.Core
|
||||
swaggerGenOptions.IncludeXmlComments(assemblyDocumentationPath);
|
||||
swaggerGenOptions.IncludeXmlComments(apiDocumentationPath);
|
||||
|
||||
// nullable stuff
|
||||
swaggerGenOptions.UseAllOfToExtendReferenceSchemas();
|
||||
|
||||
swaggerGenOptions.OperationFilter<SwaggerConfiguration>();
|
||||
swaggerGenOptions.DocumentFilter<SwaggerConfiguration>();
|
||||
swaggerGenOptions.SchemaFilter<SwaggerConfiguration>();
|
||||
@@ -337,15 +351,18 @@ namespace Tgstation.Server.Host.Core
|
||||
// Nothing is required
|
||||
schema.Required.Clear();
|
||||
|
||||
if (!schema.Enum?.Any() ?? false)
|
||||
return;
|
||||
|
||||
// Could be nullable type, make sure to get the right one
|
||||
Type enumType = context.Type.IsConstructedGenericType
|
||||
Type nonNullableType = context.Type.IsConstructedGenericType
|
||||
? context.Type.GenericTypeArguments.First()
|
||||
: context.Type;
|
||||
|
||||
OpenApiEnumVarNamesExtension.Apply(schema, enumType);
|
||||
if (nonNullableType != context.Type)
|
||||
schema.Nullable = true;
|
||||
|
||||
if (!schema.Enum?.Any() ?? false)
|
||||
return;
|
||||
|
||||
OpenApiEnumVarNamesExtension.Apply(schema, nonNullableType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,20 +48,20 @@
|
||||
<PackageReference Include="Cyberboss.SmartIrc4net.Standard" Version="0.4.6" />
|
||||
<PackageReference Include="Discord.Net.WebSocket" Version="2.2.0" />
|
||||
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0034" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0-beta1.final">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.7" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.6">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.7">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.6">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.7">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
@@ -81,12 +81,12 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="5.5.1" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
|
||||
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="4.7.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
|
||||
<PackageReference Include="System.Management" Version="4.7.0" />
|
||||
<PackageReference Include="Wangkanai.Detection.Browser" Version="2.0.0" />
|
||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="3.0.55" />
|
||||
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="3.0.57" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user