Revert string -> URL transformations

This commit is contained in:
Justin Spahr-Summers 2024-10-18 17:53:01 +01:00
commit 209f8eb1c0
No known key found for this signature in database

View file

@ -355,7 +355,7 @@ export const ResourceContentsSchema = z.object({
/**
* The URI of this resource.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
/**
* The MIME type of this resource, if known.
*/
@ -383,7 +383,7 @@ export const ResourceSchema = z.object({
/**
* The URI of this resource.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
/**
* A human-readable name for this resource.
@ -473,7 +473,7 @@ export const ReadResourceRequestSchema = RequestSchema.extend({
/**
* The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
}),
});
@ -502,7 +502,7 @@ export const SubscribeRequestSchema = RequestSchema.extend({
/**
* The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
}),
});
@ -515,7 +515,7 @@ export const UnsubscribeRequestSchema = RequestSchema.extend({
/**
* The URI of the resource to unsubscribe from.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
}),
});
@ -528,7 +528,7 @@ export const ResourceUpdatedNotificationSchema = NotificationSchema.extend({
/**
* The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
*/
uri: z.string().transform((s) => new URL(s)),
uri: z.string(),
}),
});