Skip to content

Commit b293fd2

Browse files
Copilotstephentoub
andcommitted
Replace concrete List<T> with IList<T> in public API properties
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 2fb29ba commit b293fd2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/ModelContextProtocol.Core/Authentication/ProtectedResourceMetadata.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public sealed class ProtectedResourceMetadata
3535
/// OPTIONAL.
3636
/// </remarks>
3737
[JsonPropertyName("authorization_servers")]
38-
public List<string> AuthorizationServers { get; set; } = [];
38+
public IList<string> AuthorizationServers { get; set; } = [];
3939

4040
/// <summary>
4141
/// Gets or sets the supported bearer token methods.
@@ -48,7 +48,7 @@ public sealed class ProtectedResourceMetadata
4848
/// OPTIONAL.
4949
/// </remarks>
5050
[JsonPropertyName("bearer_methods_supported")]
51-
public List<string> BearerMethodsSupported { get; set; } = ["header"];
51+
public IList<string> BearerMethodsSupported { get; set; } = ["header"];
5252

5353
/// <summary>
5454
/// Gets or sets the supported scopes.
@@ -61,7 +61,7 @@ public sealed class ProtectedResourceMetadata
6161
/// RECOMMENDED.
6262
/// </remarks>
6363
[JsonPropertyName("scopes_supported")]
64-
public List<string> ScopesSupported { get; set; } = [];
64+
public IList<string> ScopesSupported { get; set; } = [];
6565

6666
/// <summary>
6767
/// Gets or sets the URL of the protected resource's JSON Web Key (JWK) Set document.
@@ -85,7 +85,7 @@ public sealed class ProtectedResourceMetadata
8585
/// OPTIONAL. No default algorithms are implied if this entry is omitted. The value "none" MUST NOT be used.
8686
/// </remarks>
8787
[JsonPropertyName("resource_signing_alg_values_supported")]
88-
public List<string>? ResourceSigningAlgValuesSupported { get; set; }
88+
public IList<string>? ResourceSigningAlgValuesSupported { get; set; }
8989

9090
/// <summary>
9191
/// Gets or sets the human-readable name of the protected resource intended for display to the end user.
@@ -157,7 +157,7 @@ public sealed class ProtectedResourceMetadata
157157
/// OPTIONAL.
158158
/// </remarks>
159159
[JsonPropertyName("authorization_details_types_supported")]
160-
public List<string>? AuthorizationDetailsTypesSupported { get; set; }
160+
public IList<string>? AuthorizationDetailsTypesSupported { get; set; }
161161

162162
/// <summary>
163163
/// Gets or sets the list of the JWS algorithm values supported by the resource server for validating DPoP proof JWTs.
@@ -170,7 +170,7 @@ public sealed class ProtectedResourceMetadata
170170
/// OPTIONAL.
171171
/// </remarks>
172172
[JsonPropertyName("dpop_signing_alg_values_supported")]
173-
public List<string>? DpopSigningAlgValuesSupported { get; set; }
173+
public IList<string>? DpopSigningAlgValuesSupported { get; set; }
174174

175175
/// <summary>
176176
/// Gets or sets a value indicating whether the protected resource always requires the use of DPoP-bound access tokens.

src/ModelContextProtocol.Core/Protocol/ContentBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ public sealed class ToolResultContentBlock : ContentBlock
693693
/// audio, resource links, and embedded resources.
694694
/// </remarks>
695695
[JsonPropertyName("content")]
696-
public required List<ContentBlock> Content { get; set; }
696+
public required IList<ContentBlock> Content { get; set; }
697697

698698
/// <summary>
699699
/// Gets or sets an optional structured result object.

0 commit comments

Comments
 (0)