From 3545ea7a7bc5c3ce6c2de2379b1acbf25bb90c68 Mon Sep 17 00:00:00 2001 From: Thomas Eskenazi Date: Tue, 3 Mar 2026 11:23:08 +0100 Subject: [PATCH 1/3] fix: typo in folder path --- .github/workflows/validate_json_strucure.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate_json_strucure.yml b/.github/workflows/validate_json_strucure.yml index a7e6c15..c765d5a 100644 --- a/.github/workflows/validate_json_strucure.yml +++ b/.github/workflows/validate_json_strucure.yml @@ -3,8 +3,8 @@ name: Validate JSON Structure Schema on: push: paths: - - 'src/main/resources/schema/**' - - '!src/main/resources/schema/examples/**' + - 'src/main/resources/schemas/**' + - '!src/main/resources/schemas/examples/**' jobs: validate-schema: From 733abf586abe1015a36e7c4de9e058b2092234ab Mon Sep 17 00:00:00 2001 From: Thomas Eskenazi Date: Tue, 3 Mar 2026 11:39:28 +0100 Subject: [PATCH 2/3] chore:dummy schema update to test jstrut action --- .../resources/schemas/capability-schema.json | 278 ++---------------- 1 file changed, 25 insertions(+), 253 deletions(-) diff --git a/src/main/resources/schemas/capability-schema.json b/src/main/resources/schemas/capability-schema.json index 6a3fc0f..0d8ff52 100644 --- a/src/main/resources/schemas/capability-schema.json +++ b/src/main/resources/schemas/capability-schema.json @@ -19,7 +19,7 @@ "$ref": "#/$defs/ExternalRef" }, "minItems": 1, - "description": "List of external references for variable injection and resource linking." + "description": "List of external references for variable injection and resource linking. Can be used for variables or other objects." }, "capability": { "$ref": "#/$defs/Capability" @@ -145,8 +145,7 @@ "header", "path", "cookie", - "body", - "environment" + "body" ] }, "value": { @@ -259,26 +258,6 @@ "mapping": { "type": "string", "description": "JsonPath expression to extract the value. E.g. $.properties.Name.title[0].text.content" - }, - "const": { - "description": "Optional constant value. If provided, it will override the mapping and the value will be injected as-is.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "type": "array" - }, - { - "type": "object" - } - ] } }, "required": [ @@ -295,20 +274,10 @@ "type": { "const": "string" }, - "mapping": true, - "const": true + "mapping": true }, - "oneOf": [ - { - "required": [ - "mapping" - ] - }, - { - "required": [ - "const" - ] - } + "required": [ + "mapping" ], "unevaluatedProperties": false } @@ -324,20 +293,10 @@ "type": { "const": "number" }, - "mapping": true, - "const": true + "mapping": true }, - "oneOf": [ - { - "required": [ - "mapping" - ] - }, - { - "required": [ - "const" - ] - } + "required": [ + "mapping" ], "unevaluatedProperties": false } @@ -353,20 +312,10 @@ "type": { "const": "boolean" }, - "mapping": true, - "const": true + "mapping": true }, - "oneOf": [ - { - "required": [ - "mapping" - ] - }, - { - "required": [ - "const" - ] - } + "required": [ + "mapping" ], "unevaluatedProperties": false } @@ -383,7 +332,6 @@ "const": "object" }, "mapping": true, - "const": true, "properties": { "type": "object", "description": "A map of named properties. Each key is a property name, each value is a typed output parameter.", @@ -410,7 +358,6 @@ "const": "array" }, "mapping": true, - "const": true, "items": { "$ref": "#/$defs/MappedItemArray" } @@ -663,14 +610,7 @@ "type": "array", "description": "List of exposed server adapters", "items": { - "oneOf": [ - { - "$ref": "#/$defs/ExposesApi" - }, - { - "$ref": "#/$defs/ExposesMcp" - } - ] + "$ref": "#/$defs/ExposesApi" }, "minItems": 1 }, @@ -683,23 +623,9 @@ "minItems": 1 } }, - "anyOf": [ - { - "required": [ - "exposes" - ] - }, - { - "required": [ - "consumes" - ] - }, - { - "required": [ - "exposes", - "consumes" - ] - } + "required": [ + "exposes", + "consumes" ], "additionalProperties": false }, @@ -735,170 +661,11 @@ "minItems": 1 } }, - "required": [ - "type", - "port", - "namespace" - ], - "additionalProperties": false - }, - "ExposesMcp": { - "type": "object", - "description": "MCP Server exposition configuration. Exposes tools over MCP Streamable HTTP transport.", - "properties": { - "type": { - "type": "string", - "const": "mcp" - }, - "address": { - "$ref": "#/$defs/Address" - }, - "port": { - "type": "integer", - "minimum": 1, - "maximum": 65535 - }, - "namespace": { - "$ref": "#/$defs/IdentifierKebab", - "description": "Unique identifier for this exposed MCP server" - }, - "description": { - "type": "string", - "description": "A meaningful description of this MCP server's purpose. Used as the server instructions sent during MCP initialization." - }, - "tools": { - "type": "array", - "description": "List of MCP tools exposed by this server", - "items": { - "$ref": "#/$defs/McpTool" - }, - "minItems": 1 - } - }, "required": [ "type", "port", "namespace", - "tools" - ], - "additionalProperties": false - }, - "McpTool": { - "type": "object", - "description": "An MCP tool definition. Each tool maps to one or more consumed HTTP operations.", - "properties": { - "name": { - "$ref": "#/$defs/IdentifierKebab", - "description": "Technical name for the tool. Used as the MCP tool name." - }, - "description": { - "type": "string", - "description": "A meaningful description of the tool. Used for agent discovery. Remember, in a world of agents, context is king." - }, - "inputParameters": { - "type": "array", - "description": "Tool input parameters. These become the MCP tool's input schema (JSON Schema).", - "items": { - "$ref": "#/$defs/McpToolInputParameter" - } - }, - "call": { - "type": "string", - "description": "For simple cases, the reference to the consumed operation. Format: {namespace}.{operationId}.", - "pattern": "^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+$" - }, - "with": { - "$ref": "#/$defs/WithInjector" - }, - "steps": { - "type": "array", - "items": { - "$ref": "#/$defs/OperationStep" - }, - "minItems": 1 - }, - "mappings": { - "type": "array", - "description": "Maps step outputs to the tool's output parameters.", - "items": { - "$ref": "#/$defs/StepOutputMapping" - } - }, - "outputParameters": { - "type": "array" - } - }, - "required": [ - "name", - "description" - ], - "anyOf": [ - { - "required": [ - "call" - ], - "type": "object", - "properties": { - "outputParameters": { - "type": "array", - "items": { - "$ref": "#/$defs/MappedOutputParameter" - } - } - } - }, - { - "required": [ - "steps" - ], - "type": "object", - "properties": { - "mappings": true, - "outputParameters": { - "type": "array", - "items": { - "$ref": "#/$defs/OrchestratedOutputParameter" - } - } - } - } - ], - "additionalProperties": false - }, - "McpToolInputParameter": { - "type": "object", - "description": "Declares an input parameter for an MCP tool. These become properties in the tool's JSON Schema input definition.", - "properties": { - "name": { - "$ref": "#/$defs/IdentifierExtended", - "description": "Name of the parameter. Becomes a property name in the tool's input schema." - }, - "type": { - "type": "string", - "description": "The expected data type of the parameter.", - "enum": [ - "string", - "number", - "integer", - "boolean", - "array", - "object" - ] - }, - "description": { - "type": "string", - "description": "A meaningful description of the parameter. Used for agent discovery and tool documentation." - }, - "required": { - "type": "boolean", - "description": "Whether the parameter is required. Defaults to true.", - "default": true - } - }, - "required": [ - "name", - "type", - "description" + "resources" ], "additionalProperties": false }, @@ -1019,8 +786,11 @@ "required": [ "method" ], - "anyOf": [ + "oneOf": [ { + "required": [ + "call" + ], "properties": { "outputParameters": { "items": { @@ -1103,7 +873,8 @@ "namespace", "description", "type", - "baseUri" + "baseUri", + "resources" ], "additionalProperties": false }, @@ -1484,7 +1255,8 @@ } }, "required": [ - "targetNamespace" + "targetNamespace", + "trustedHeaders" ], "additionalProperties": false }, @@ -1598,4 +1370,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file From 6f8ecc84574146b61af9d209e7a0054762ffc27b Mon Sep 17 00:00:00 2001 From: Thomas Eskenazi Date: Tue, 3 Mar 2026 13:46:50 +0100 Subject: [PATCH 3/3] fix:fixing bad rebased --- .../resources/schemas/capability-schema.json | 276 ++++++++++++++++-- 1 file changed, 252 insertions(+), 24 deletions(-) diff --git a/src/main/resources/schemas/capability-schema.json b/src/main/resources/schemas/capability-schema.json index 0d8ff52..b76b961 100644 --- a/src/main/resources/schemas/capability-schema.json +++ b/src/main/resources/schemas/capability-schema.json @@ -19,7 +19,7 @@ "$ref": "#/$defs/ExternalRef" }, "minItems": 1, - "description": "List of external references for variable injection and resource linking. Can be used for variables or other objects." + "description": "List of external references for variable injection and resource linking." }, "capability": { "$ref": "#/$defs/Capability" @@ -145,7 +145,8 @@ "header", "path", "cookie", - "body" + "body", + "environment" ] }, "value": { @@ -258,6 +259,26 @@ "mapping": { "type": "string", "description": "JsonPath expression to extract the value. E.g. $.properties.Name.title[0].text.content" + }, + "const": { + "description": "Optional constant value. If provided, it will override the mapping and the value will be injected as-is.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "array" + }, + { + "type": "object" + } + ] } }, "required": [ @@ -274,10 +295,20 @@ "type": { "const": "string" }, - "mapping": true + "mapping": true, + "const": true }, - "required": [ - "mapping" + "oneOf": [ + { + "required": [ + "mapping" + ] + }, + { + "required": [ + "const" + ] + } ], "unevaluatedProperties": false } @@ -293,10 +324,20 @@ "type": { "const": "number" }, - "mapping": true + "mapping": true, + "const": true }, - "required": [ - "mapping" + "oneOf": [ + { + "required": [ + "mapping" + ] + }, + { + "required": [ + "const" + ] + } ], "unevaluatedProperties": false } @@ -312,10 +353,20 @@ "type": { "const": "boolean" }, - "mapping": true + "mapping": true, + "const": true }, - "required": [ - "mapping" + "oneOf": [ + { + "required": [ + "mapping" + ] + }, + { + "required": [ + "const" + ] + } ], "unevaluatedProperties": false } @@ -332,6 +383,7 @@ "const": "object" }, "mapping": true, + "const": true, "properties": { "type": "object", "description": "A map of named properties. Each key is a property name, each value is a typed output parameter.", @@ -358,6 +410,7 @@ "const": "array" }, "mapping": true, + "const": true, "items": { "$ref": "#/$defs/MappedItemArray" } @@ -610,7 +663,14 @@ "type": "array", "description": "List of exposed server adapters", "items": { - "$ref": "#/$defs/ExposesApi" + "oneOf": [ + { + "$ref": "#/$defs/ExposesApi" + }, + { + "$ref": "#/$defs/ExposesMcp" + } + ] }, "minItems": 1 }, @@ -623,9 +683,23 @@ "minItems": 1 } }, - "required": [ - "exposes", - "consumes" + "anyOf": [ + { + "required": [ + "exposes" + ] + }, + { + "required": [ + "consumes" + ] + }, + { + "required": [ + "exposes", + "consumes" + ] + } ], "additionalProperties": false }, @@ -661,11 +735,170 @@ "minItems": 1 } }, + "required": [ + "type", + "port", + "namespace" + ], + "additionalProperties": false + }, + "ExposesMcp": { + "type": "object", + "description": "MCP Server exposition configuration. Exposes tools over MCP Streamable HTTP transport.", + "properties": { + "type": { + "type": "string", + "const": "mcp" + }, + "address": { + "$ref": "#/$defs/Address" + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + }, + "namespace": { + "$ref": "#/$defs/IdentifierKebab", + "description": "Unique identifier for this exposed MCP server" + }, + "description": { + "type": "string", + "description": "A meaningful description of this MCP server's purpose. Used as the server instructions sent during MCP initialization." + }, + "tools": { + "type": "array", + "description": "List of MCP tools exposed by this server", + "items": { + "$ref": "#/$defs/McpTool" + }, + "minItems": 1 + } + }, "required": [ "type", "port", "namespace", - "resources" + "tools" + ], + "additionalProperties": false + }, + "McpTool": { + "type": "object", + "description": "An MCP tool definition. Each tool maps to one or more consumed HTTP operations.", + "properties": { + "name": { + "$ref": "#/$defs/IdentifierKebab", + "description": "Technical name for the tool. Used as the MCP tool name." + }, + "description": { + "type": "string", + "description": "A meaningful description of the tool. Used for agent discovery. Remember, in a world of agents, context is king." + }, + "inputParameters": { + "type": "array", + "description": "Tool input parameters. These become the MCP tool's input schema (JSON Schema).", + "items": { + "$ref": "#/$defs/McpToolInputParameter" + } + }, + "call": { + "type": "string", + "description": "For simple cases, the reference to the consumed operation. Format: {namespace}.{operationId}.", + "pattern": "^[a-zA-Z0-9-]+\\.[a-zA-Z0-9-]+$" + }, + "with": { + "$ref": "#/$defs/WithInjector" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/$defs/OperationStep" + }, + "minItems": 1 + }, + "mappings": { + "type": "array", + "description": "Maps step outputs to the tool's output parameters.", + "items": { + "$ref": "#/$defs/StepOutputMapping" + } + }, + "outputParameters": { + "type": "array" + } + }, + "required": [ + "name", + "description" + ], + "anyOf": [ + { + "required": [ + "call" + ], + "type": "object", + "properties": { + "outputParameters": { + "type": "array", + "items": { + "$ref": "#/$defs/MappedOutputParameter" + } + } + } + }, + { + "required": [ + "steps" + ], + "type": "object", + "properties": { + "mappings": true, + "outputParameters": { + "type": "array", + "items": { + "$ref": "#/$defs/OrchestratedOutputParameter" + } + } + } + } + ], + "additionalProperties": false + }, + "McpToolInputParameter": { + "type": "object", + "description": "Declares an input parameter for an MCP tool. These become properties in the tool's JSON Schema input definition.", + "properties": { + "name": { + "$ref": "#/$defs/IdentifierExtended", + "description": "Name of the parameter. Becomes a property name in the tool's input schema." + }, + "type": { + "type": "string", + "description": "The expected data type of the parameter.", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array", + "object" + ] + }, + "description": { + "type": "string", + "description": "A meaningful description of the parameter. Used for agent discovery and tool documentation." + }, + "required": { + "type": "boolean", + "description": "Whether the parameter is required. Defaults to true.", + "default": true + } + }, + "required": [ + "name", + "type", + "description" ], "additionalProperties": false }, @@ -786,11 +1019,8 @@ "required": [ "method" ], - "oneOf": [ + "anyOf": [ { - "required": [ - "call" - ], "properties": { "outputParameters": { "items": { @@ -873,8 +1103,7 @@ "namespace", "description", "type", - "baseUri", - "resources" + "baseUri" ], "additionalProperties": false }, @@ -1255,8 +1484,7 @@ } }, "required": [ - "targetNamespace", - "trustedHeaders" + "targetNamespace" ], "additionalProperties": false },