Add missing Annotations (#138)
This commit is contained in:
parent
f55302b449
commit
96dd7dcff3
4 changed files with 20 additions and 18 deletions
|
|
@ -1,16 +0,0 @@
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace ModelContextProtocol.Protocol.Types;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Base for objects that include optional annotations for the client. The client can use annotations to inform how objects are used or displayed.
|
|
||||||
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
|
|
||||||
/// </summary>
|
|
||||||
public abstract record Annotated
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Optional annotations for the resource.
|
|
||||||
/// </summary>
|
|
||||||
[JsonPropertyName("annotations")]
|
|
||||||
public Annotations? Annotations { get; init; }
|
|
||||||
}
|
|
||||||
|
|
@ -39,4 +39,10 @@ public class Content
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("resource")]
|
[JsonPropertyName("resource")]
|
||||||
public ResourceContents? Resource { get; set; }
|
public ResourceContents? Resource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional annotations for the content.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("annotations")]
|
||||||
|
public Annotations? Annotations { get; init; }
|
||||||
}
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
|
||||||
/// Represents a known resource that the server is capable of reading.
|
/// Represents a known resource that the server is capable of reading.
|
||||||
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
|
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public record Resource : Annotated
|
public record Resource
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The URI of this resource.
|
/// The URI of this resource.
|
||||||
|
|
@ -31,4 +31,10 @@ public record Resource : Annotated
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("mimeType")]
|
[JsonPropertyName("mimeType")]
|
||||||
public string? MimeType { get; init; }
|
public string? MimeType { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional annotations for the resource.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("annotations")]
|
||||||
|
public Annotations? Annotations { get; init; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace ModelContextProtocol.Protocol.Types;
|
||||||
/// Represents a known resource template that the server is capable of reading.
|
/// Represents a known resource template that the server is capable of reading.
|
||||||
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
|
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public record ResourceTemplate : Annotated
|
public record ResourceTemplate
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The URI template (according to RFC 6570) that can be used to construct resource URIs.
|
/// The URI template (according to RFC 6570) that can be used to construct resource URIs.
|
||||||
|
|
@ -31,4 +31,10 @@ public record ResourceTemplate : Annotated
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("mimeType")]
|
[JsonPropertyName("mimeType")]
|
||||||
public string? MimeType { get; init; }
|
public string? MimeType { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional annotations for the resource template.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("annotations")]
|
||||||
|
public Annotations? Annotations { get; init; }
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue