consolidation of some of the modules, localization fixes, product advisories work, qa work
This commit is contained in:
@@ -12,7 +12,7 @@ using System.Text.Json.Serialization.Metadata;
|
||||
|
||||
namespace StellaOps.Scanner.WebService.Serialization;
|
||||
|
||||
internal static class OrchestratorEventSerializer
|
||||
internal static class JobEngineEventSerializer
|
||||
{
|
||||
private static readonly JsonSerializerOptions CanonicalOptions = CreateOptions();
|
||||
private static readonly JsonSerializerOptions PrettyOptions = new()
|
||||
@@ -21,10 +21,10 @@ internal static class OrchestratorEventSerializer
|
||||
Encoder = JavaScriptEncoder.Default
|
||||
};
|
||||
|
||||
public static string Serialize(OrchestratorEvent @event)
|
||||
public static string Serialize(JobEngineEvent @event)
|
||||
=> Encoding.UTF8.GetString(CanonJson.Canonicalize(@event, CanonicalOptions));
|
||||
|
||||
public static string SerializeIndented(OrchestratorEvent @event)
|
||||
public static string SerializeIndented(JobEngineEvent @event)
|
||||
{
|
||||
var canonicalBytes = CanonJson.Canonicalize(@event, CanonicalOptions);
|
||||
using var document = JsonDocument.Parse(canonicalBytes);
|
||||
@@ -48,7 +48,7 @@ internal static class OrchestratorEventSerializer
|
||||
{
|
||||
private static readonly ImmutableDictionary<Type, string[]> PropertyOrder = new Dictionary<Type, string[]>
|
||||
{
|
||||
[typeof(OrchestratorEvent)] = new[]
|
||||
[typeof(JobEngineEvent)] = new[]
|
||||
{
|
||||
"eventId",
|
||||
"kind",
|
||||
@@ -65,7 +65,7 @@ internal static class OrchestratorEventSerializer
|
||||
"payload",
|
||||
"attributes"
|
||||
},
|
||||
[typeof(OrchestratorEventScope)] = new[]
|
||||
[typeof(JobEngineEventScope)] = new[]
|
||||
{
|
||||
"namespace",
|
||||
"repo",
|
||||
@@ -212,7 +212,7 @@ internal static class OrchestratorEventSerializer
|
||||
|
||||
private static void ConfigurePolymorphism(JsonTypeInfo info)
|
||||
{
|
||||
if (info.Type != typeof(OrchestratorEventPayload))
|
||||
if (info.Type != typeof(JobEngineEventPayload))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user