Compare commits

..

6 Commits

Author SHA1 Message Date
ArchiBot
250074356b Automatic translations update 2025-12-28 02:39:06 +00:00
Łukasz Domeradzki
52e89112ce Misc 2025-12-28 02:26:13 +01:00
Łukasz Domeradzki
379d3f04a9 Misc 2025-12-28 02:25:27 +01:00
Łukasz Domeradzki
d75028a1e9 Do not allow plugins to modify default ASF json serializer settings upon creation
This can only accidentally break things we expect to be operative
2025-12-28 01:04:44 +01:00
Łukasz Domeradzki
10a7fe157b Misc 2025-12-27 16:49:04 +01:00
Łukasz Domeradzki
5563531170 Bump 2025-12-27 16:10:47 +01:00
5 changed files with 19 additions and 4 deletions

View File

@@ -116,8 +116,8 @@ public static class JsonUtilities {
}
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "We don't care about trimmed assemblies, as we need it to work only with the known (used) ones")]
private static JsonSerializerOptions CreateDefaultJsonSerializerOptions(bool writeIndented = false) =>
new(JsonSerializerDefaults.Strict) {
private static JsonSerializerOptions CreateDefaultJsonSerializerOptions(bool writeIndented = false) {
JsonSerializerOptions result = new(JsonSerializerDefaults.Strict) {
AllowTrailingCommas = true,
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
IndentCharacter = '\t',
@@ -129,6 +129,11 @@ public static class JsonUtilities {
WriteIndented = writeIndented
};
result.MakeReadOnly();
return result;
}
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2070", Justification = "We don't care about trimmed methods, it's not like we can make it work differently anyway")]
[UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2075", Justification = "We don't care about trimmed properties, it's not like we can make it work differently anyway")]
private static MethodInfo? GetShouldSerializeMethod([SuppressMessage("ReSharper", "SuggestBaseTypeForParameter")] Type parent, JsonPropertyInfo property) {

View File

@@ -87,6 +87,8 @@ public sealed class NLogController : ArchiController {
[EndpointDescription("This API endpoint requires a websocket connection")]
[EndpointSummary("Fetches ASF log in realtime")]
[ProducesResponseType((int) HttpStatusCode.SwitchingProtocols)]
[ProducesResponseType((int) HttpStatusCode.OK)]
[ProducesResponseType<GenericResponse>((int) HttpStatusCode.BadRequest)]
public async Task<ActionResult> Get() {
if (HttpContext == null) {

View File

@@ -85,6 +85,14 @@ internal sealed class DocumentTransformer : IOpenApiDocumentTransformer {
}
},
{
StatusCodes.Status200OK.ToString(CultureInfo.InvariantCulture),
new OpenApiResponse {
Description = nameof(HttpStatusCode.OK)
}
},
{
StatusCodes.Status400BadRequest.ToString(CultureInfo.InvariantCulture),

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>6.3.1.6</Version>
<Version>6.3.1.7</Version>
</PropertyGroup>
<PropertyGroup>

2
wiki

Submodule wiki updated: 27df146074...5681982ba5