Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class MatchDetail
/// <summary>
/// Gets or sets the type of the matcher.
/// </summary>
public required Type MatcherType { get; set; }
public required string MatcherType { get; set; }

/// <summary>
/// Gets or sets the type of the matcher.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Copyright © WireMock.Net

using System.Linq;

namespace WireMock.Matchers.Request;

/// <summary>
Expand Down Expand Up @@ -30,7 +28,7 @@ public double AddScore(Type matcherType, double score, Exception? exception)
return AddMatchDetail(new MatchDetail
{
Name = matcherType.Name.Replace("RequestMessage", string.Empty),
MatcherType = matcherType,
MatcherType = matcherType.Name,
Score = score,
Exception = exception
});
Expand Down
3 changes: 1 addition & 2 deletions src/WireMock.Net.Shared/Matchers/MatchResult.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright © WireMock.Net

using System.Linq;
using Stef.Validation;
using WireMock.Extensions;
using WireMock.Matchers.Request;
Expand Down Expand Up @@ -119,7 +118,7 @@ public MatchDetail ToMatchDetail()
return new MatchDetail
{
Name = Name,
MatcherType = typeof(MatchResult),
MatcherType = typeof(MatchResult).Name,
Score = Score,
Exception = Exception,
MatchDetails = MatchResults?.Select(mr => mr.ToMatchDetail()).ToArray()
Expand Down
4 changes: 4 additions & 0 deletions src/dotnet-WireMock.Net/Json/SourceGenerationContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © WireMock.Net

using System.Text.Json.Serialization;
using Newtonsoft.Json.Linq;
using WireMock.Admin.Mappings;
using WireMock.Admin.Requests;
using WireMock.Types;
Expand All @@ -9,10 +10,13 @@ namespace WireMock.Net.Json;

[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(EncodingModel))]
[JsonSerializable(typeof(JArray))]
[JsonSerializable(typeof(JObject))]
[JsonSerializable(typeof(LogEntryModel))]
[JsonSerializable(typeof(LogRequestModel))]
[JsonSerializable(typeof(LogResponseModel))]
[JsonSerializable(typeof(LogRequestMatchModel))]
[JsonSerializable(typeof(StatusModel))]
[JsonSerializable(typeof(WireMockList<string>))]
internal partial class SourceGenerationContext : JsonSerializerContext
{
Expand Down
6 changes: 0 additions & 6 deletions src/dotnet-WireMock.Net/WireMockLogger.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright © WireMock.Net

using System;
using System.Text.Json;
using Microsoft.Extensions.Logging;
using WireMock.Admin.Requests;
Expand All @@ -11,11 +10,6 @@ namespace WireMock.Net;

public class WireMockLogger : IWireMockLogger
{
private readonly JsonSerializerOptions _options = new()
{
WriteIndented = true
};

private readonly ILogger _logger;

public WireMockLogger(ILogger logger)
Expand Down
Loading