mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
fix: adjust mcp schema validation and add default path support
Updated `mcp.json` to enhance validation by supporting `anyOf` schema for `entity` properties and refined `role` typing. Introduced default `path` property for MCP system API and aligned build assets configuration accordingly.
This commit is contained in:
@@ -7,6 +7,7 @@ async function generate() {
|
|||||||
server: {
|
server: {
|
||||||
mcp: {
|
mcp: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
path: "/mcp",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
157
docs/mcp.json
157
docs/mcp.json
@@ -35,8 +35,7 @@
|
|||||||
"minLength": 8
|
"minLength": 8
|
||||||
},
|
},
|
||||||
"role": {
|
"role": {
|
||||||
"type": "string",
|
"type": "string"
|
||||||
"enum": []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -134,10 +133,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -161,10 +167,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -194,10 +207,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -235,10 +255,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -276,10 +303,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
}
|
}
|
||||||
@@ -297,10 +331,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -334,10 +375,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -410,10 +458,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -462,10 +517,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -494,10 +556,17 @@
|
|||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": {
|
"entity": {
|
||||||
"type": "string",
|
"anyOf": [
|
||||||
"enum": [
|
{
|
||||||
"users",
|
"type": "string",
|
||||||
"media"
|
"enum": [
|
||||||
|
"users",
|
||||||
|
"media"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"$target": "param"
|
"$target": "param"
|
||||||
},
|
},
|
||||||
@@ -3994,6 +4063,10 @@
|
|||||||
"enabled": {
|
"enabled": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false
|
"default": false
|
||||||
|
},
|
||||||
|
"path": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "/api/system/mcp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user