|
1 | 1 | using System; |
2 | 2 | using System.Text.Json; |
3 | 3 | using System.Text.Json.Nodes; |
4 | | -using System.Text.Json.Serialization; |
5 | 4 | using com.IvanMurzak.ReflectorNet.Json; |
6 | 5 | using com.IvanMurzak.ReflectorNet.Model; |
7 | 6 | using com.IvanMurzak.ReflectorNet.Utils; |
8 | 7 |
|
9 | 8 | namespace com.IvanMurzak.ReflectorNet.Tests.Model |
10 | 9 | { |
11 | | - public class SerializedMemberCustomDescriptionConverter : JsonConverter<SerializedMember>, IJsonSchemaConverter |
| 10 | + public class SerializedMemberCustomDescriptionConverter : JsonSchemaConverter<SerializedMember>, IJsonSchemaConverter |
12 | 11 | { |
13 | 12 | public const string CustomDescription = "Custom description, used for testing purposes."; |
14 | 13 |
|
15 | | - public static string StaticId => TypeUtils.GetTypeId<SerializedMember>(); |
16 | 14 | public static JsonNode Schema => new JsonObject |
17 | 15 | { |
18 | 16 | [JsonSchema.Type] = JsonSchema.Object, |
@@ -64,15 +62,13 @@ public class SerializedMemberCustomDescriptionConverter : JsonConverter<Serializ |
64 | 62 |
|
65 | 63 | readonly Reflector _reflector; |
66 | 64 |
|
67 | | - public string Id => StaticId; |
68 | | - |
69 | 65 | public SerializedMemberCustomDescriptionConverter(Reflector reflector) |
70 | 66 | { |
71 | 67 | _reflector = reflector ?? throw new ArgumentNullException(nameof(reflector)); |
72 | 68 | } |
73 | 69 |
|
74 | | - public JsonNode GetSchemeRef() => SchemaRef; |
75 | | - public JsonNode GetScheme() => Schema; |
| 70 | + public override JsonNode GetSchemaRef() => SchemaRef; |
| 71 | + public override JsonNode GetSchema() => Schema; |
76 | 72 |
|
77 | 73 | public override SerializedMember? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) |
78 | 74 | { |
|
0 commit comments