Audit protocol types (#892)

This commit is contained in:
Mackinnon Buck 2025-11-04 18:41:10 -05:00 • committed by GitHub
commit 121929da36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
@ -18,13 +19,14 @@ public sealed class Root
/// Gets or sets the URI of the root.
/// </summary>
[JsonPropertyName("uri")]
public required string Uri { get; init; }
[StringSyntax(StringSyntaxAttribute.Uri)]
public required string Uri { get; set; }
/// <summary>
/// Gets or sets a human-readable name for the root.
/// </summary>
[JsonPropertyName("name")]
public string? Name { get; init; }
public string? Name { get; set; }
/// <summary>
/// Gets or sets additional metadata for the root.
@ -33,5 +35,5 @@ public sealed class Root
/// This is reserved by the protocol for future use.
/// </remarks>
[JsonPropertyName("_meta")]
public JsonElement? Meta { get; init; }
}
public JsonElement? Meta { get; set; }
}