From 97719e3545ff0b74482237711130e1aaa939892c Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 5 Jun 2026 15:55:33 -0400 Subject: [PATCH 1/4] Include a JSON Pointer location for the `dependents` endpoint Signed-off-by: Juan Cruz Viotti --- docs/api.md | 1 + ...-2025-11-25-get_schema_dependents.all.hurl | 138 ++++++++++++++++++ ...-2025-11-25-get_schema_dependents.all.hurl | 4 + src/index/generators.h | 24 +-- .../api/schemas/dependents/response.json | 10 +- .../call/get-schema-dependents/response.json | 3 +- .../headless/hurl/schemas-dependents.all.hurl | 7 + test/e2e/html/hurl/list.all.hurl | 8 +- .../html/hurl/schemas-dependencies.all.hurl | 58 ++++++++ .../e2e/html/hurl/schemas-dependents.all.hurl | 68 +++++++++ .../schemas/test/folder/custom-meta-2020.json | 17 +++ .../test/folder/custom-meta-draft7.json | 7 + .../schemas/test/folder/using-meta-2020.json | 5 + .../test/folder/using-meta-draft7.json | 5 + 14 files changed, 338 insertions(+), 17 deletions(-) create mode 100644 test/e2e/html/schemas/test/folder/custom-meta-2020.json create mode 100644 test/e2e/html/schemas/test/folder/custom-meta-draft7.json create mode 100644 test/e2e/html/schemas/test/folder/using-meta-2020.json create mode 100644 test/e2e/html/schemas/test/folder/using-meta-draft7.json diff --git a/docs/api.md b/docs/api.md index b858c8ef1..52bd4b5df 100644 --- a/docs/api.md +++ b/docs/api.md @@ -355,6 +355,7 @@ GET /self/v1/api/schemas/dependents/{path} |----------|------|----------|-------------| | `/*/from` | String | Yes | The absolute URL of the schema that originates the dependency | | `/*/to` | String | Yes | The absolute URL of the schema being referenced | + | `/*/at` | String | Yes | The JSON Pointer to the schema location where the dependency originates | === "404" diff --git a/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl b/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl index 4ad878786..06be0a3c7 100644 --- a/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl +++ b/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl @@ -179,9 +179,11 @@ jsonpath "$.result.content[2].mimeType" == "application/schema+json" jsonpath "$.result.structuredContent.results" count == 1 jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/self/v1/schemas/mcp/response" jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/self/v1/schemas/mcp/error" +jsonpath "$.result.structuredContent.results[0].at" == "/$defs/single/anyOf/2/$ref" variable "text" jsonpath "$.results" count == 1 variable "text" jsonpath "$.results[0].from" == "{{base}}/self/v1/schemas/mcp/response" variable "text" jsonpath "$.results[0].to" == "{{base}}/self/v1/schemas/mcp/error" +variable "text" jsonpath "$.results[0].at" == "/$defs/single/anyOf/2/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -296,9 +298,11 @@ jsonpath "$.result.content[2].mimeType" == "application/schema+json" jsonpath "$.result.structuredContent.results" count == 1 jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/self/v1/schemas/mcp/response" jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/self/v1/schemas/mcp/error" +jsonpath "$.result.structuredContent.results[0].at" == "/$defs/single/anyOf/2/$ref" variable "text" jsonpath "$.results" count == 1 variable "text" jsonpath "$.results[0].from" == "{{base}}/self/v1/schemas/mcp/response" variable "text" jsonpath "$.results[0].to" == "{{base}}/self/v1/schemas/mcp/error" +variable "text" jsonpath "$.results[0].at" == "/$defs/single/anyOf/2/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -1233,3 +1237,137 @@ HTTP 200 header "Referrer-Policy" not exists header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ jsonpath "$.valid" == true + +POST {{base}}/self/v1/mcp +MCP-Protocol-Version: 2025-11-25 +Content-Type: application/json +``` +{ + "jsonrpc": "2.0", + "id": 360, + "method": "tools/call", + "params": { + "name": "get_schema_dependents", + "arguments": { "schema": "{{base}}/test/schemas/custom-meta-draft7" } + } +} +``` +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: {{base}} +Link: ; rel="describedby" +MCP-Protocol-Version: 2025-11-25 +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +text: jsonpath "$.result.content[0].text" +structured_content: body regex "(?s)\"structuredContent\": ((?:\\{.*?\n \\})|(?:\\[.*?\n \\]))" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.jsonrpc" == "2.0" +jsonpath "$.id" == 360 +jsonpath "$.result.isError" == false +jsonpath "$.result.content" count == 3 +jsonpath "$.result.content[0].type" == "text" +jsonpath "$.result.content[1].type" == "resource_link" +jsonpath "$.result.content[1].uri" == "{{base}}/test/schemas/custom-meta-draft7" +jsonpath "$.result.content[1].mimeType" == "application/schema+json" +jsonpath "$.result.content[2].type" == "resource_link" +jsonpath "$.result.content[2].uri" == "{{base}}/test/schemas/using-meta-draft7" +jsonpath "$.result.content[2].mimeType" == "application/schema+json" +jsonpath "$.result.structuredContent.results" count == 1 +jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/test/schemas/using-meta-draft7" +jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/test/schemas/custom-meta-draft7" +jsonpath "$.result.structuredContent.results[0].at" == "/$schema" +variable "text" jsonpath "$.results" count == 1 +variable "text" jsonpath "$.results[0].from" == "{{base}}/test/schemas/using-meta-draft7" +variable "text" jsonpath "$.results[0].to" == "{{base}}/test/schemas/custom-meta-draft7" +variable "text" jsonpath "$.results[0].at" == "/$schema" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +POST {{base}}/self/v1/api/schemas/evaluate{{output_schema_path}} +``` +{{structured_content}} +``` +HTTP 200 +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +POST {{base}}/self/v1/mcp +MCP-Protocol-Version: 2025-11-25 +Content-Type: application/json +``` +{ + "jsonrpc": "2.0", + "id": 361, + "method": "tools/call", + "params": { + "name": "get_schema_dependents", + "arguments": { "schema": "{{base}}/test/schemas/custom-meta-2020" } + } +} +``` +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: {{base}} +Link: ; rel="describedby" +MCP-Protocol-Version: 2025-11-25 +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +text: jsonpath "$.result.content[0].text" +structured_content: body regex "(?s)\"structuredContent\": ((?:\\{.*?\n \\})|(?:\\[.*?\n \\]))" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.jsonrpc" == "2.0" +jsonpath "$.id" == 361 +jsonpath "$.result.isError" == false +jsonpath "$.result.content" count == 3 +jsonpath "$.result.content[0].type" == "text" +jsonpath "$.result.content[1].type" == "resource_link" +jsonpath "$.result.content[1].uri" == "{{base}}/test/schemas/custom-meta-2020" +jsonpath "$.result.content[1].mimeType" == "application/schema+json" +jsonpath "$.result.content[2].type" == "resource_link" +jsonpath "$.result.content[2].uri" == "{{base}}/test/schemas/using-meta-2020" +jsonpath "$.result.content[2].mimeType" == "application/schema+json" +jsonpath "$.result.structuredContent.results" count == 1 +jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/test/schemas/using-meta-2020" +jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/test/schemas/custom-meta-2020" +jsonpath "$.result.structuredContent.results[0].at" == "/$schema" +variable "text" jsonpath "$.results" count == 1 +variable "text" jsonpath "$.results[0].from" == "{{base}}/test/schemas/using-meta-2020" +variable "text" jsonpath "$.results[0].to" == "{{base}}/test/schemas/custom-meta-2020" +variable "text" jsonpath "$.results[0].at" == "/$schema" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +POST {{base}}/self/v1/api/schemas/evaluate{{output_schema_path}} +``` +{{structured_content}} +``` +HTTP 200 +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true diff --git a/enterprise/e2e/path/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl b/enterprise/e2e/path/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl index 31372b165..05ed295c1 100644 --- a/enterprise/e2e/path/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl +++ b/enterprise/e2e/path/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl @@ -65,9 +65,11 @@ jsonpath "$.result.content[2].mimeType" == "application/schema+json" jsonpath "$.result.structuredContent.results" count == 1 jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/v1/catalog/self/v1/schemas/mcp/response" jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/v1/catalog/self/v1/schemas/mcp/error" +jsonpath "$.result.structuredContent.results[0].at" == "/$defs/single/anyOf/2/$ref" variable "text" jsonpath "$.results" count == 1 variable "text" jsonpath "$.results[0].from" == "{{base}}/v1/catalog/self/v1/schemas/mcp/response" variable "text" jsonpath "$.results[0].to" == "{{base}}/v1/catalog/self/v1/schemas/mcp/error" +variable "text" jsonpath "$.results[0].at" == "/$defs/single/anyOf/2/$ref" POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -131,9 +133,11 @@ jsonpath "$.result.content[2].mimeType" == "application/schema+json" jsonpath "$.result.structuredContent.results" count == 1 jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/v1/catalog/self/v1/schemas/mcp/response" jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/v1/catalog/self/v1/schemas/mcp/error" +jsonpath "$.result.structuredContent.results[0].at" == "/$defs/single/anyOf/2/$ref" variable "text" jsonpath "$.results" count == 1 variable "text" jsonpath "$.results[0].from" == "{{base}}/v1/catalog/self/v1/schemas/mcp/response" variable "text" jsonpath "$.results[0].to" == "{{base}}/v1/catalog/self/v1/schemas/mcp/error" +variable "text" jsonpath "$.results[0].at" == "/$defs/single/anyOf/2/$ref" POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} ``` diff --git a/src/index/generators.h b/src/index/generators.h index 7756c8f2e..21f0d366d 100644 --- a/src/index/generators.h +++ b/src/index/generators.h @@ -39,6 +39,7 @@ #include // std::queue #include // std::set #include // std::ostringstream +#include // std::tuple #include // std::unordered_map #include // std::move, std::pair @@ -313,7 +314,8 @@ struct GENERATE_DEPENDENTS { using DirectMap = std::unordered_map>; + std::set>>; DirectMap direct; for (const auto &dependency : action.dependencies) { const auto contents_option{ @@ -322,15 +324,16 @@ struct GENERATE_DEPENDENTS { const auto &contents{contents_option.value()}; assert(contents.is_array()); for (const auto &entry : contents.as_array()) { - direct[entry.at("to").to_string()].emplace( - entry.at("from").to_string()); + direct[entry.at("to").to_string()].emplace(entry.at("from").to_string(), + entry.at("at").to_string()); } } - using TransitiveMap = - std::unordered_map>>; + using TransitiveMap = std::unordered_map< + sourcemeta::core::JSON::String, + std::set>>; TransitiveMap transitive; for (const auto &[target, _] : direct) { auto &edges{transitive[target]}; @@ -346,8 +349,8 @@ struct GENERATE_DEPENDENTS { continue; } - for (const auto &dependent : match->second) { - edges.emplace(dependent, current); + for (const auto &[dependent, at] : match->second) { + edges.emplace(dependent, current, at); if (visited.emplace(dependent).second) { queue.emplace(dependent); } @@ -358,10 +361,11 @@ struct GENERATE_DEPENDENTS { auto result{sourcemeta::core::JSON::make_array()}; const auto match{transitive.find(std::string{action.data})}; if (match != transitive.cend()) { - for (const auto &[from, to] : match->second) { + for (const auto &[from, to, at] : match->second) { auto object{sourcemeta::core::JSON::make_object()}; object.assign("from", sourcemeta::core::JSON{from}); object.assign("to", sourcemeta::core::JSON{to}); + object.assign("at", sourcemeta::core::JSON{at}); result.push_back(std::move(object)); } } diff --git a/src/self/v1/schemas/api/schemas/dependents/response.json b/src/self/v1/schemas/api/schemas/dependents/response.json index 823c397ac..5b3ebeb49 100644 --- a/src/self/v1/schemas/api/schemas/dependents/response.json +++ b/src/self/v1/schemas/api/schemas/dependents/response.json @@ -6,15 +6,21 @@ [ { "from": "https://example.com/schemas/user.json", - "to": "https://example.com/schemas/address.json" + "to": "https://example.com/schemas/address.json", + "at": "/properties/address/$ref" } ] ], "type": "array", "items": { "type": "object", - "required": [ "from", "to" ], + "required": [ "from", "to", "at" ], "properties": { + "at": { + "x-format-assertion": true, + "type": "string", + "format": "json-pointer" + }, "from": { "x-format-assertion": true, "type": "string", diff --git a/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json b/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json index c2acf378f..29a17d0c6 100644 --- a/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json +++ b/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json @@ -7,7 +7,8 @@ "results": [ { "from": "https://example.com/schemas/user.json", - "to": "https://example.com/schemas/address.json" + "to": "https://example.com/schemas/address.json", + "at": "/properties/address" } ] } diff --git a/test/e2e/headless/hurl/schemas-dependents.all.hurl b/test/e2e/headless/hurl/schemas-dependents.all.hurl index a2854f8ca..8ca5a5f64 100644 --- a/test/e2e/headless/hurl/schemas-dependents.all.hurl +++ b/test/e2e/headless/hurl/schemas-dependents.all.hurl @@ -14,10 +14,13 @@ header "Last-Modified" exists jsonpath "$" count == 3 jsonpath "$[0].from" == "{{base}}/test/schemas/bundling-double" jsonpath "$[0].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[0].at" == "/properties/foo/$ref" jsonpath "$[1].from" == "{{base}}/test/schemas/with-rebase" jsonpath "$[1].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[1].at" == "/$ref" jsonpath "$[2].from" == "{{base}}/test/schemas/with-rebase-same-host" jsonpath "$[2].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[2].at" == "/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -46,12 +49,16 @@ header "Last-Modified" exists jsonpath "$" count == 4 jsonpath "$[0].from" == "{{base}}/test/schemas/bundling-double" jsonpath "$[0].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[0].at" == "/properties/foo/$ref" jsonpath "$[1].from" == "{{base}}/test/schemas/bundling-single" jsonpath "$[1].to" == "{{base}}/test/schemas/no-id" +jsonpath "$[1].at" == "/properties/foo/$ref" jsonpath "$[2].from" == "{{base}}/test/schemas/with-rebase" jsonpath "$[2].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[2].at" == "/$ref" jsonpath "$[3].from" == "{{base}}/test/schemas/with-rebase-same-host" jsonpath "$[3].to" == "{{base}}/test/schemas/bundling-single" +jsonpath "$[3].at" == "/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` diff --git a/test/e2e/html/hurl/list.all.hurl b/test/e2e/html/hurl/list.all.hurl index 7f0e3e12f..a5dc88598 100644 --- a/test/e2e/html/hurl/list.all.hurl +++ b/test/e2e/html/hurl/list.all.hurl @@ -14,7 +14,7 @@ header "Last-Modified" exists jsonpath "$.path" == "/" jsonpath "$.url" == "{{base}}" jsonpath "$.breadcrumb" count == 0 -jsonpath "$.schemas" == 102 +jsonpath "$.schemas" == 106 jsonpath "$.entries" count >= 2 jsonpath "$.entries[0].name" == "self" jsonpath "$.entries[0].title" == "Self" @@ -28,7 +28,7 @@ jsonpath "$.entries[1].title" == "Test" jsonpath "$.entries[1].description" == "A directory full of testing schemas" jsonpath "$.entries[1].type" == "directory" jsonpath "$.entries[1].health" == 13 -jsonpath "$.entries[1].schemas" == 46 +jsonpath "$.entries[1].schemas" == 50 jsonpath "$.entries[1].path" == "/test/" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} @@ -62,7 +62,7 @@ jsonpath "$.breadcrumb[0].name" == "test" jsonpath "$.breadcrumb[0].path" == "/test/" jsonpath "$.description" == "A directory full of testing schemas" jsonpath "$.title" == "Test" -jsonpath "$.schemas" == 46 +jsonpath "$.schemas" == 50 jsonpath "$.entries" count == 13 jsonpath "$.entries[0].name" == "v2.0" jsonpath "$.entries[0].type" == "directory" @@ -124,7 +124,7 @@ jsonpath "$.entries[10].path" == "/test/same/" jsonpath "$.entries[11].name" == "schemas" jsonpath "$.entries[11].type" == "directory" jsonpath "$.entries[11].health" == 7 -jsonpath "$.entries[11].schemas" == 25 +jsonpath "$.entries[11].schemas" == 29 jsonpath "$.entries[11].path" == "/test/schemas/" jsonpath "$.entries[12].name" == "unsafe-alert" jsonpath "$.entries[12].type" == "directory" diff --git a/test/e2e/html/hurl/schemas-dependencies.all.hurl b/test/e2e/html/hurl/schemas-dependencies.all.hurl index 6777040c7..2fddb57bd 100644 --- a/test/e2e/html/hurl/schemas-dependencies.all.hurl +++ b/test/e2e/html/hurl/schemas-dependencies.all.hurl @@ -140,6 +140,64 @@ header "Referrer-Policy" not exists header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ jsonpath "$.valid" == true +GET {{base}}/self/v1/api/schemas/dependencies/test/schemas/using-meta-draft7 +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: * +Link: ; rel="describedby" +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +header "ETag" exists +header "Last-Modified" exists +jsonpath "$" count == 1 +jsonpath "$[0].from" == "{{base}}/test/schemas/using-meta-draft7" +jsonpath "$[0].to" == "{{base}}/test/schemas/custom-meta-draft7" +jsonpath "$[0].at" == "/$schema" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +Link: ; rel="describedby" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +GET {{base}}/self/v1/api/schemas/dependencies/test/schemas/using-meta-2020 +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: * +Link: ; rel="describedby" +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +header "ETag" exists +header "Last-Modified" exists +jsonpath "$" count == 1 +jsonpath "$[0].from" == "{{base}}/test/schemas/using-meta-2020" +jsonpath "$[0].to" == "{{base}}/test/schemas/custom-meta-2020" +jsonpath "$[0].at" == "/$schema" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +Link: ; rel="describedby" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + HEAD {{base}}/self/v1/api/schemas/dependencies/test/v2.0/schema HTTP 200 Content-Type: application/json diff --git a/test/e2e/html/hurl/schemas-dependents.all.hurl b/test/e2e/html/hurl/schemas-dependents.all.hurl index 537e82f52..dddbcc608 100644 --- a/test/e2e/html/hurl/schemas-dependents.all.hurl +++ b/test/e2e/html/hurl/schemas-dependents.all.hurl @@ -14,10 +14,13 @@ header "Last-Modified" exists jsonpath "$" count == 3 jsonpath "$[0].from" == "{{base}}/test/bundling/double" jsonpath "$[0].to" == "{{base}}/test/bundling/single" +jsonpath "$[0].at" == "/properties/foo/$ref" jsonpath "$[1].from" == "{{base}}/test/schemas/with-rebase" jsonpath "$[1].to" == "{{base}}/test/bundling/single" +jsonpath "$[1].at" == "/$ref" jsonpath "$[2].from" == "{{base}}/test/schemas/with-rebase-same-host" jsonpath "$[2].to" == "{{base}}/test/bundling/single" +jsonpath "$[2].at" == "/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -46,12 +49,16 @@ header "Last-Modified" exists jsonpath "$" count == 4 jsonpath "$[0].from" == "{{base}}/test/bundling/double" jsonpath "$[0].to" == "{{base}}/test/bundling/single" +jsonpath "$[0].at" == "/properties/foo/$ref" jsonpath "$[1].from" == "{{base}}/test/bundling/single" jsonpath "$[1].to" == "{{base}}/test/v2.0/schema" +jsonpath "$[1].at" == "/properties/foo/$ref" jsonpath "$[2].from" == "{{base}}/test/schemas/with-rebase" jsonpath "$[2].to" == "{{base}}/test/bundling/single" +jsonpath "$[2].at" == "/$ref" jsonpath "$[3].from" == "{{base}}/test/schemas/with-rebase-same-host" jsonpath "$[3].to" == "{{base}}/test/bundling/single" +jsonpath "$[3].at" == "/$ref" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` @@ -132,10 +139,71 @@ header "Last-Modified" exists jsonpath "$" count == 3 jsonpath "$[0].from" == "{{base}}/test/schemas/cycle/bar" jsonpath "$[0].to" == "{{base}}/test/schemas/cycle/baz" +jsonpath "$[0].at" == "/additionalProperties/$ref" jsonpath "$[1].from" == "{{base}}/test/schemas/cycle/baz" jsonpath "$[1].to" == "{{base}}/test/schemas/cycle/foo" +jsonpath "$[1].at" == "/additionalProperties/$ref" jsonpath "$[2].from" == "{{base}}/test/schemas/cycle/foo" jsonpath "$[2].to" == "{{base}}/test/schemas/cycle/bar" +jsonpath "$[2].at" == "/additionalProperties/$ref" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +Link: ; rel="describedby" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +GET {{base}}/self/v1/api/schemas/dependents/test/schemas/custom-meta-draft7 +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: * +Link: ; rel="describedby" +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +header "ETag" exists +header "Last-Modified" exists +jsonpath "$" count == 1 +jsonpath "$[0].from" == "{{base}}/test/schemas/using-meta-draft7" +jsonpath "$[0].to" == "{{base}}/test/schemas/custom-meta-draft7" +jsonpath "$[0].at" == "/$schema" + +POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} +``` +{{last_response}} +``` +HTTP 200 +Link: ; rel="describedby" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +jsonpath "$.valid" == true + +GET {{base}}/self/v1/api/schemas/dependents/test/schemas/custom-meta-2020 +HTTP 200 +Content-Type: application/json +Access-Control-Allow-Origin: * +Link: ; rel="describedby" +[Captures] +last_response: body +schema_path: header "Link" regex "<([^>]+)>" +[Asserts] +header "Referrer-Policy" not exists +header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ +header "ETag" exists +header "Last-Modified" exists +jsonpath "$" count == 1 +jsonpath "$[0].from" == "{{base}}/test/schemas/using-meta-2020" +jsonpath "$[0].to" == "{{base}}/test/schemas/custom-meta-2020" +jsonpath "$[0].at" == "/$schema" POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} ``` diff --git a/test/e2e/html/schemas/test/folder/custom-meta-2020.json b/test/e2e/html/schemas/test/folder/custom-meta-2020.json new file mode 100644 index 000000000..decdaab11 --- /dev/null +++ b/test/e2e/html/schemas/test/folder/custom-meta-2020.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://example.com/schemas/custom-meta-2020.json", + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://json-schema.org/draft/2020-12/vocab/unevaluated": true + }, + "$dynamicAnchor": "meta", + "allOf": [ + { "$ref": "https://json-schema.org/draft/2020-12/schema" } + ] +} diff --git a/test/e2e/html/schemas/test/folder/custom-meta-draft7.json b/test/e2e/html/schemas/test/folder/custom-meta-draft7.json new file mode 100644 index 000000000..2031ef4b1 --- /dev/null +++ b/test/e2e/html/schemas/test/folder/custom-meta-draft7.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/schemas/custom-meta-draft7.json", + "allOf": [ + { "$ref": "http://json-schema.org/draft-07/schema#" } + ] +} diff --git a/test/e2e/html/schemas/test/folder/using-meta-2020.json b/test/e2e/html/schemas/test/folder/using-meta-2020.json new file mode 100644 index 000000000..676eaabf7 --- /dev/null +++ b/test/e2e/html/schemas/test/folder/using-meta-2020.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://example.com/schemas/custom-meta-2020.json", + "$id": "https://example.com/schemas/using-meta-2020.json", + "type": "string" +} diff --git a/test/e2e/html/schemas/test/folder/using-meta-draft7.json b/test/e2e/html/schemas/test/folder/using-meta-draft7.json new file mode 100644 index 000000000..4bb634262 --- /dev/null +++ b/test/e2e/html/schemas/test/folder/using-meta-draft7.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://example.com/schemas/custom-meta-draft7.json", + "$id": "https://example.com/schemas/using-meta-draft7.json", + "type": "string" +} From 5fe2ed47c9a2a21abdedc4e6257adef5cb837d8b Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 5 Jun 2026 16:08:48 -0400 Subject: [PATCH 2/4] Fix Signed-off-by: Juan Cruz Viotti --- .../mcp/tools/call/get-schema-dependencies/response.json | 2 +- .../schemas/mcp/tools/call/get-schema-dependents/response.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json b/src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json index 9f01215ec..a43fcc2b6 100644 --- a/src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json +++ b/src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json @@ -8,7 +8,7 @@ { "from": "https://example.com/schemas/user.json", "to": "https://example.com/schemas/address.json", - "at": "/properties/address" + "at": "/properties/address/$ref" } ] } diff --git a/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json b/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json index 29a17d0c6..18e0f5d7b 100644 --- a/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json +++ b/src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json @@ -8,7 +8,7 @@ { "from": "https://example.com/schemas/user.json", "to": "https://example.com/schemas/address.json", - "at": "/properties/address" + "at": "/properties/address/$ref" } ] } From 298c9a9ef00b9461549e3514a0dfe973ff85ed0b Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 5 Jun 2026 16:35:23 -0400 Subject: [PATCH 3/4] Fix Signed-off-by: Juan Cruz Viotti --- ...-2025-11-25-get_schema_dependents.all.hurl | 134 ------------------ .../hurl/mcp-2025-11-25-resources.all.hurl | 6 +- .../hurl/mcp-2025-11-25-resources.all.hurl | 6 +- test/e2e/html/hurl/list.all.hurl | 2 +- .../schemas/test/folder/custom-meta-2020.json | 5 +- .../test/folder/custom-meta-draft7.json | 5 +- 6 files changed, 9 insertions(+), 149 deletions(-) diff --git a/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl b/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl index 06be0a3c7..041fdfa1e 100644 --- a/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl +++ b/enterprise/e2e/html/hurl/mcp-2025-11-25-get_schema_dependents.all.hurl @@ -1237,137 +1237,3 @@ HTTP 200 header "Referrer-Policy" not exists header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ jsonpath "$.valid" == true - -POST {{base}}/self/v1/mcp -MCP-Protocol-Version: 2025-11-25 -Content-Type: application/json -``` -{ - "jsonrpc": "2.0", - "id": 360, - "method": "tools/call", - "params": { - "name": "get_schema_dependents", - "arguments": { "schema": "{{base}}/test/schemas/custom-meta-draft7" } - } -} -``` -HTTP 200 -Content-Type: application/json -Access-Control-Allow-Origin: {{base}} -Link: ; rel="describedby" -MCP-Protocol-Version: 2025-11-25 -[Captures] -last_response: body -schema_path: header "Link" regex "<([^>]+)>" -text: jsonpath "$.result.content[0].text" -structured_content: body regex "(?s)\"structuredContent\": ((?:\\{.*?\n \\})|(?:\\[.*?\n \\]))" -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.jsonrpc" == "2.0" -jsonpath "$.id" == 360 -jsonpath "$.result.isError" == false -jsonpath "$.result.content" count == 3 -jsonpath "$.result.content[0].type" == "text" -jsonpath "$.result.content[1].type" == "resource_link" -jsonpath "$.result.content[1].uri" == "{{base}}/test/schemas/custom-meta-draft7" -jsonpath "$.result.content[1].mimeType" == "application/schema+json" -jsonpath "$.result.content[2].type" == "resource_link" -jsonpath "$.result.content[2].uri" == "{{base}}/test/schemas/using-meta-draft7" -jsonpath "$.result.content[2].mimeType" == "application/schema+json" -jsonpath "$.result.structuredContent.results" count == 1 -jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/test/schemas/using-meta-draft7" -jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/test/schemas/custom-meta-draft7" -jsonpath "$.result.structuredContent.results[0].at" == "/$schema" -variable "text" jsonpath "$.results" count == 1 -variable "text" jsonpath "$.results[0].from" == "{{base}}/test/schemas/using-meta-draft7" -variable "text" jsonpath "$.results[0].to" == "{{base}}/test/schemas/custom-meta-draft7" -variable "text" jsonpath "$.results[0].at" == "/$schema" - -POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} -``` -{{last_response}} -``` -HTTP 200 -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.valid" == true - -POST {{base}}/self/v1/api/schemas/evaluate{{output_schema_path}} -``` -{{structured_content}} -``` -HTTP 200 -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.valid" == true - -POST {{base}}/self/v1/mcp -MCP-Protocol-Version: 2025-11-25 -Content-Type: application/json -``` -{ - "jsonrpc": "2.0", - "id": 361, - "method": "tools/call", - "params": { - "name": "get_schema_dependents", - "arguments": { "schema": "{{base}}/test/schemas/custom-meta-2020" } - } -} -``` -HTTP 200 -Content-Type: application/json -Access-Control-Allow-Origin: {{base}} -Link: ; rel="describedby" -MCP-Protocol-Version: 2025-11-25 -[Captures] -last_response: body -schema_path: header "Link" regex "<([^>]+)>" -text: jsonpath "$.result.content[0].text" -structured_content: body regex "(?s)\"structuredContent\": ((?:\\{.*?\n \\})|(?:\\[.*?\n \\]))" -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.jsonrpc" == "2.0" -jsonpath "$.id" == 361 -jsonpath "$.result.isError" == false -jsonpath "$.result.content" count == 3 -jsonpath "$.result.content[0].type" == "text" -jsonpath "$.result.content[1].type" == "resource_link" -jsonpath "$.result.content[1].uri" == "{{base}}/test/schemas/custom-meta-2020" -jsonpath "$.result.content[1].mimeType" == "application/schema+json" -jsonpath "$.result.content[2].type" == "resource_link" -jsonpath "$.result.content[2].uri" == "{{base}}/test/schemas/using-meta-2020" -jsonpath "$.result.content[2].mimeType" == "application/schema+json" -jsonpath "$.result.structuredContent.results" count == 1 -jsonpath "$.result.structuredContent.results[0].from" == "{{base}}/test/schemas/using-meta-2020" -jsonpath "$.result.structuredContent.results[0].to" == "{{base}}/test/schemas/custom-meta-2020" -jsonpath "$.result.structuredContent.results[0].at" == "/$schema" -variable "text" jsonpath "$.results" count == 1 -variable "text" jsonpath "$.results[0].from" == "{{base}}/test/schemas/using-meta-2020" -variable "text" jsonpath "$.results[0].to" == "{{base}}/test/schemas/custom-meta-2020" -variable "text" jsonpath "$.results[0].at" == "/$schema" - -POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}} -``` -{{last_response}} -``` -HTTP 200 -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.valid" == true - -POST {{base}}/self/v1/api/schemas/evaluate{{output_schema_path}} -``` -{{structured_content}} -``` -HTTP 200 -[Asserts] -header "Referrer-Policy" not exists -header "Date" matches /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (0[1-9]|[12][0-9]|3[01]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4} ([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9] GMT$/ -jsonpath "$.valid" == true diff --git a/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl b/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl index bcfc1f94b..2183705f9 100644 --- a/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl +++ b/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl @@ -446,7 +446,7 @@ jsonpath "$.result.resources[23].uri" == "{{base}}/self/v1/schemas/api/schemas/d jsonpath "$.result.resources[23].name" == "Sourcemeta One Schema Dependents API Response" jsonpath "$.result.resources[23].description" == "The response format for the schema dependents API endpoint" jsonpath "$.result.resources[23].mimeType" == "application/schema+json" -jsonpath "$.result.resources[23].size" == 820 +jsonpath "$.result.resources[23].size" == 986 jsonpath "$.result.resources[23].annotations.priority" == 0 jsonpath "$.result.resources[24].uri" == "{{base}}/self/v1/schemas/api/schemas/evaluate/request" jsonpath "$.result.resources[24].name" == "Sourcemeta One Schema Evaluate API Request" @@ -665,7 +665,7 @@ jsonpath "$.result.resources[3].uri" == "{{base}}/self/v1/schemas/mcp/tools/call jsonpath "$.result.resources[3].name" == "Sourcemeta One Schema Dependencies RPC Output" jsonpath "$.result.resources[3].description" == "Get all direct and indirect dependencies of a schema in the catalog" jsonpath "$.result.resources[3].mimeType" == "application/schema+json" -jsonpath "$.result.resources[3].size" == 736 +jsonpath "$.result.resources[3].size" == 741 jsonpath "$.result.resources[3].annotations.priority" == 0 jsonpath "$.result.resources[4].uri" == "{{base}}/self/v1/schemas/mcp/tools/call/get-schema-dependents/request" jsonpath "$.result.resources[4].name" == "Sourcemeta One Schema Dependents RPC Input" @@ -677,7 +677,7 @@ jsonpath "$.result.resources[5].uri" == "{{base}}/self/v1/schemas/mcp/tools/call jsonpath "$.result.resources[5].name" == "Sourcemeta One Schema Dependents RPC Output" jsonpath "$.result.resources[5].description" == "Get all direct and transitive dependents of a schema in the catalog" jsonpath "$.result.resources[5].mimeType" == "application/schema+json" -jsonpath "$.result.resources[5].size" == 691 +jsonpath "$.result.resources[5].size" == 735 jsonpath "$.result.resources[5].annotations.priority" == 0 jsonpath "$.result.resources[6].uri" == "{{base}}/self/v1/schemas/mcp/tools/call/get-schema-health/request" jsonpath "$.result.resources[6].name" == "Sourcemeta One Schema Health RPC Input" diff --git a/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl b/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl index bd6bf5538..2ab7790dd 100644 --- a/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl +++ b/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl @@ -80,7 +80,7 @@ jsonpath "$.result.resources[10].uri" == "{{base}}/v1/catalog/self/v1/schemas/ap jsonpath "$.result.resources[10].name" == "Sourcemeta One Schema Dependents API Response" jsonpath "$.result.resources[10].description" == "The response format for the schema dependents API endpoint" jsonpath "$.result.resources[10].mimeType" == "application/schema+json" -jsonpath "$.result.resources[10].size" == 831 +jsonpath "$.result.resources[10].size" == 997 jsonpath "$.result.resources[10].annotations.priority" == 0 jsonpath "$.result.resources[11].uri" == "{{base}}/v1/catalog/self/v1/schemas/api/schemas/evaluate/request" jsonpath "$.result.resources[11].name" == "Sourcemeta One Schema Evaluate API Request" @@ -260,7 +260,7 @@ jsonpath "$.result.resources[40].uri" == "{{base}}/v1/catalog/self/v1/schemas/mc jsonpath "$.result.resources[40].name" == "Sourcemeta One Schema Dependencies RPC Output" jsonpath "$.result.resources[40].description" == "Get all direct and indirect dependencies of a schema in the catalog" jsonpath "$.result.resources[40].mimeType" == "application/schema+json" -jsonpath "$.result.resources[40].size" == 747 +jsonpath "$.result.resources[40].size" == 752 jsonpath "$.result.resources[40].annotations.priority" == 0 jsonpath "$.result.resources[41].uri" == "{{base}}/v1/catalog/self/v1/schemas/mcp/tools/call/get-schema-dependents/request" jsonpath "$.result.resources[41].name" == "Sourcemeta One Schema Dependents RPC Input" @@ -272,7 +272,7 @@ jsonpath "$.result.resources[42].uri" == "{{base}}/v1/catalog/self/v1/schemas/mc jsonpath "$.result.resources[42].name" == "Sourcemeta One Schema Dependents RPC Output" jsonpath "$.result.resources[42].description" == "Get all direct and transitive dependents of a schema in the catalog" jsonpath "$.result.resources[42].mimeType" == "application/schema+json" -jsonpath "$.result.resources[42].size" == 702 +jsonpath "$.result.resources[42].size" == 746 jsonpath "$.result.resources[42].annotations.priority" == 0 jsonpath "$.result.resources[43].uri" == "{{base}}/v1/catalog/self/v1/schemas/mcp/tools/call/get-schema-health/request" jsonpath "$.result.resources[43].name" == "Sourcemeta One Schema Health RPC Input" diff --git a/test/e2e/html/hurl/list.all.hurl b/test/e2e/html/hurl/list.all.hurl index a5dc88598..2c6bb30e4 100644 --- a/test/e2e/html/hurl/list.all.hurl +++ b/test/e2e/html/hurl/list.all.hurl @@ -123,7 +123,7 @@ jsonpath "$.entries[10].schemas" == 1 jsonpath "$.entries[10].path" == "/test/same/" jsonpath "$.entries[11].name" == "schemas" jsonpath "$.entries[11].type" == "directory" -jsonpath "$.entries[11].health" == 7 +jsonpath "$.entries[11].health" == 6 jsonpath "$.entries[11].schemas" == 29 jsonpath "$.entries[11].path" == "/test/schemas/" jsonpath "$.entries[12].name" == "unsafe-alert" diff --git a/test/e2e/html/schemas/test/folder/custom-meta-2020.json b/test/e2e/html/schemas/test/folder/custom-meta-2020.json index decdaab11..a1ffb3004 100644 --- a/test/e2e/html/schemas/test/folder/custom-meta-2020.json +++ b/test/e2e/html/schemas/test/folder/custom-meta-2020.json @@ -10,8 +10,5 @@ "https://json-schema.org/draft/2020-12/vocab/content": true, "https://json-schema.org/draft/2020-12/vocab/unevaluated": true }, - "$dynamicAnchor": "meta", - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" } - ] + "$dynamicAnchor": "meta" } diff --git a/test/e2e/html/schemas/test/folder/custom-meta-draft7.json b/test/e2e/html/schemas/test/folder/custom-meta-draft7.json index 2031ef4b1..af723c57c 100644 --- a/test/e2e/html/schemas/test/folder/custom-meta-draft7.json +++ b/test/e2e/html/schemas/test/folder/custom-meta-draft7.json @@ -1,7 +1,4 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/schemas/custom-meta-draft7.json", - "allOf": [ - { "$ref": "http://json-schema.org/draft-07/schema#" } - ] + "$id": "https://example.com/schemas/custom-meta-draft7.json" } From ab9acbf7443253ad7b27b8825e002e38e319aa00 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 5 Jun 2026 16:44:56 -0400 Subject: [PATCH 4/4] More Signed-off-by: Juan Cruz Viotti --- enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl | 2 +- enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl | 2 +- src/self/v1/schemas/api/schemas/dependencies/response.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl b/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl index 2183705f9..b42617cd4 100644 --- a/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl +++ b/enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl @@ -440,7 +440,7 @@ jsonpath "$.result.resources[22].uri" == "{{base}}/self/v1/schemas/api/schemas/d jsonpath "$.result.resources[22].name" == "Sourcemeta One Schema Dependencies API Response" jsonpath "$.result.resources[22].description" == "The response format for the schema dependencies API endpoint" jsonpath "$.result.resources[22].mimeType" == "application/schema+json" -jsonpath "$.result.resources[22].size" == 987 +jsonpath "$.result.resources[22].size" == 992 jsonpath "$.result.resources[22].annotations.priority" == 0 jsonpath "$.result.resources[23].uri" == "{{base}}/self/v1/schemas/api/schemas/dependents/response" jsonpath "$.result.resources[23].name" == "Sourcemeta One Schema Dependents API Response" diff --git a/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl b/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl index 2ab7790dd..37b392f2b 100644 --- a/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl +++ b/enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl @@ -74,7 +74,7 @@ jsonpath "$.result.resources[9].uri" == "{{base}}/v1/catalog/self/v1/schemas/api jsonpath "$.result.resources[9].name" == "Sourcemeta One Schema Dependencies API Response" jsonpath "$.result.resources[9].description" == "The response format for the schema dependencies API endpoint" jsonpath "$.result.resources[9].mimeType" == "application/schema+json" -jsonpath "$.result.resources[9].size" == 998 +jsonpath "$.result.resources[9].size" == 1003 jsonpath "$.result.resources[9].annotations.priority" == 0 jsonpath "$.result.resources[10].uri" == "{{base}}/v1/catalog/self/v1/schemas/api/schemas/dependents/response" jsonpath "$.result.resources[10].name" == "Sourcemeta One Schema Dependents API Response" diff --git a/src/self/v1/schemas/api/schemas/dependencies/response.json b/src/self/v1/schemas/api/schemas/dependencies/response.json index 60e803577..780c3f52c 100644 --- a/src/self/v1/schemas/api/schemas/dependencies/response.json +++ b/src/self/v1/schemas/api/schemas/dependencies/response.json @@ -7,7 +7,7 @@ { "from": "https://example.com/schemas/user.json", "to": "https://example.com/schemas/address.json", - "at": "/properties/address" + "at": "/properties/address/$ref" } ] ],