Use SchemaValidator to validate tool input (#203)
* Use SchemaValidator to validate tool input * add test * add changelog * fix cs * Improve error message * fix tests * fix tests * fix baseline * update snapshot files * Remove BC compat while switching to v0.3.0 --------- Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
This commit is contained in:
parent
c0938a19bd
commit
ed205ef793
4 changed files with 103 additions and 29 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Project Deadline\\\" scheduled successfully for \\\"2024-12-15\\\".\",\n \"event_details\": {\n \"title\": \"Project Deadline\",\n \"date\": \"2024-12-15\",\n \"type\": \"reminder\",\n \"time\": \"All day\",\n \"priority\": \"Normal\",\n \"attendees\": [],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Project Deadline\\\" scheduled successfully for \\\"2024-12-15\\\".\",\n \"event_details\": {\n \"title\": \"Project Deadline\",\n \"date\": \"2024-12-15\",\n \"type\": \"reminder\",\n \"time\": \"All day\",\n \"priority\": \"High\",\n \"attendees\": [],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"date": "2024-12-15",
|
||||
"type": "reminder",
|
||||
"time": "All day",
|
||||
"priority": "Normal",
|
||||
"priority": "High",
|
||||
"attendees": [],
|
||||
"invites_will_be_sent": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Client Call\\\" scheduled successfully for \\\"2024-12-02\\\".\",\n \"event_details\": {\n \"title\": \"Client Call\",\n \"date\": \"2024-12-02\",\n \"type\": \"call\",\n \"time\": \"14:30\",\n \"priority\": \"Normal\",\n \"attendees\": [\n \"client@example.com\"\n ],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Client Call\\\" scheduled successfully for \\\"2024-12-02\\\".\",\n \"event_details\": {\n \"title\": \"Client Call\",\n \"date\": \"2024-12-02\",\n \"type\": \"call\",\n \"time\": \"14:30\",\n \"priority\": \"High\",\n \"attendees\": [\n \"client@example.com\"\n ],\n \"invites_will_be_sent\": false\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"date": "2024-12-02",
|
||||
"type": "call",
|
||||
"time": "14:30",
|
||||
"priority": "Normal",
|
||||
"priority": "High",
|
||||
"attendees": [
|
||||
"client@example.com"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Office Party\\\" scheduled successfully for \\\"2024-12-20\\\".\",\n \"event_details\": {\n \"title\": \"Office Party\",\n \"date\": \"2024-12-20\",\n \"type\": \"other\",\n \"time\": \"18:00\",\n \"priority\": \"Normal\",\n \"attendees\": [\n \"team@company.com\"\n ],\n \"invites_will_be_sent\": true\n }\n}"
|
||||
"text": "{\n \"success\": true,\n \"message\": \"Event \\\"Office Party\\\" scheduled successfully for \\\"2024-12-20\\\".\",\n \"event_details\": {\n \"title\": \"Office Party\",\n \"date\": \"2024-12-20\",\n \"type\": \"other\",\n \"time\": \"18:00\",\n \"priority\": \"Low\",\n \"attendees\": [\n \"team@company.com\"\n ],\n \"invites_will_be_sent\": true\n }\n}"
|
||||
}
|
||||
],
|
||||
"structuredContent": {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
"date": "2024-12-20",
|
||||
"type": "other",
|
||||
"time": "18:00",
|
||||
"priority": "Normal",
|
||||
"priority": "Low",
|
||||
"attendees": [
|
||||
"team@company.com"
|
||||
],
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@
|
|||
"default": null
|
||||
},
|
||||
"priority": {
|
||||
"type": "integer",
|
||||
"type": "string",
|
||||
"description": "The priority of the event. Defaults to Normal.",
|
||||
"default": 1,
|
||||
"default": "normal",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
"low",
|
||||
"normal",
|
||||
"high"
|
||||
]
|
||||
},
|
||||
"attendees": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue