Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ GET /self/v1/api/schemas/health/{path}

*This endpoint retrieves metadata about every URI associated with the JSON
Schema located at the specified `{path}` parameter, including schema resources,
subschemas, anchors, and more.*
subschemas, and anchors.*

```
GET /self/v1/api/schemas/locations/{path}
Expand Down
6 changes: 3 additions & 3 deletions enterprise/e2e/auth/hurl/mcp-resources.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jsonpath "$.result.resources[10].uri" == "{{base}}/self/v1/schemas/api/schemas/l
jsonpath "$.result.resources[10].name" == "Sourcemeta One Schema Locations API Response"
jsonpath "$.result.resources[10].description" == "The response format for the schema frame locations API endpoint"
jsonpath "$.result.resources[10].mimeType" == "application/schema+json"
jsonpath "$.result.resources[10].size" == 2402
jsonpath "$.result.resources[10].size" == 2391
jsonpath "$.result.resources[10].annotations.priority" == 0
jsonpath "$.result.resources[11].uri" == "{{base}}/self/v1/schemas/api/schemas/metadata/response"
jsonpath "$.result.resources[11].name" == "Sourcemeta One Schema Metadata API Response"
Expand Down Expand Up @@ -540,7 +540,7 @@ jsonpath "$.result.resources[13].uri" == "{{base}}/self/v1/schemas/api/schemas/l
jsonpath "$.result.resources[13].name" == "Sourcemeta One Schema Locations API Response"
jsonpath "$.result.resources[13].description" == "The response format for the schema frame locations API endpoint"
jsonpath "$.result.resources[13].mimeType" == "application/schema+json"
jsonpath "$.result.resources[13].size" == 2402
jsonpath "$.result.resources[13].size" == 2391
jsonpath "$.result.resources[13].annotations.priority" == 0
jsonpath "$.result.resources[14].uri" == "{{base}}/self/v1/schemas/api/schemas/metadata/response"
jsonpath "$.result.resources[14].name" == "Sourcemeta One Schema Metadata API Response"
Expand Down Expand Up @@ -971,7 +971,7 @@ jsonpath "$.result.resources[11].uri" == "{{base}}/self/v1/schemas/api/schemas/l
jsonpath "$.result.resources[11].name" == "Sourcemeta One Schema Locations API Response"
jsonpath "$.result.resources[11].description" == "The response format for the schema frame locations API endpoint"
jsonpath "$.result.resources[11].mimeType" == "application/schema+json"
jsonpath "$.result.resources[11].size" == 2402
jsonpath "$.result.resources[11].size" == 2391
jsonpath "$.result.resources[11].annotations.priority" == 0
jsonpath "$.result.resources[12].uri" == "{{base}}/self/v1/schemas/api/schemas/metadata/response"
jsonpath "$.result.resources[12].name" == "Sourcemeta One Schema Metadata API Response"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01'].dialect" ==
variable "text" jsonpath "$.static['{{base}}/test/bare/01'].dialect" == "https://json-schema.org/draft/2020-12/schema"
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01'].baseDialect" == "https://json-schema.org/draft/2020-12/schema"
variable "text" jsonpath "$.static['{{base}}/test/bare/01'].baseDialect" == "https://json-schema.org/draft/2020-12/schema"
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/$id'].type" == "pointer"
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/$id'].type" == "pointer"
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/$schema'].type" == "pointer"
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/$schema'].type" == "pointer"
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/type'].type" == "pointer"
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/type'].type" == "pointer"
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/$id']" not exists
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/$id']" not exists
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/$schema']" not exists
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/$schema']" not exists
jsonpath "$.result.structuredContent.static['{{base}}/test/bare/01#/type']" not exists
variable "text" jsonpath "$.static['{{base}}/test/bare/01#/type']" not exists

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
```
Expand Down Expand Up @@ -152,10 +152,10 @@ jsonpath "$.result.structuredContent.dynamic" exists
variable "text" jsonpath "$.dynamic" exists
jsonpath "$.result.structuredContent.static['{{base}}/test/object'].type" == "resource"
variable "text" jsonpath "$.static['{{base}}/test/object'].type" == "resource"
jsonpath "$.result.structuredContent.static['{{base}}/test/object#/title'].type" == "pointer"
variable "text" jsonpath "$.static['{{base}}/test/object#/title'].type" == "pointer"
jsonpath "$.result.structuredContent.static['{{base}}/test/object#/description'].type" == "pointer"
variable "text" jsonpath "$.static['{{base}}/test/object#/description'].type" == "pointer"
jsonpath "$.result.structuredContent.static['{{base}}/test/object#/title']" not exists
variable "text" jsonpath "$.static['{{base}}/test/object#/title']" not exists
jsonpath "$.result.structuredContent.static['{{base}}/test/object#/description']" not exists
variable "text" jsonpath "$.static['{{base}}/test/object#/description']" not exists
jsonpath "$.result.structuredContent.static['{{base}}/test/object#/properties/foo'].type" == "subschema"
variable "text" jsonpath "$.static['{{base}}/test/object#/properties/foo'].type" == "subschema"

Expand Down
4 changes: 2 additions & 2 deletions enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ jsonpath "$.result.resources[35].uri" == "{{base}}/self/v1/schemas/api/schemas/l
jsonpath "$.result.resources[35].name" == "Sourcemeta One Schema Locations API Response"
jsonpath "$.result.resources[35].description" == "The response format for the schema frame locations API endpoint"
jsonpath "$.result.resources[35].mimeType" == "application/schema+json"
jsonpath "$.result.resources[35].size" == 2402
jsonpath "$.result.resources[35].size" == 2391
jsonpath "$.result.resources[35].annotations.priority" == 0
jsonpath "$.result.resources[36].uri" == "{{base}}/self/v1/schemas/api/schemas/metadata/response"
jsonpath "$.result.resources[36].name" == "Sourcemeta One Schema Metadata API Response"
Expand Down Expand Up @@ -1299,7 +1299,7 @@ jsonpath "$.result.resources[35].uri" == "{{base}}/self/v1/schemas/api/schemas/l
jsonpath "$.result.resources[35].name" == "Sourcemeta One Schema Locations API Response"
jsonpath "$.result.resources[35].description" == "The response format for the schema frame locations API endpoint"
jsonpath "$.result.resources[35].mimeType" == "application/schema+json"
jsonpath "$.result.resources[35].size" == 2402
jsonpath "$.result.resources[35].size" == 2391
jsonpath "$.result.resources[35].annotations.priority" == 0
jsonpath "$.result.resources[36].uri" == "{{base}}/self/v1/schemas/api/schemas/metadata/response"
jsonpath "$.result.resources[36].name" == "Sourcemeta One Schema Metadata API Response"
Expand Down
2 changes: 1 addition & 1 deletion src/index/generators.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ struct GenerateFrameLocations {
return resolver(identifier, callback);
}};
const sourcemeta::blaze::SchemaFrame frame{
sourcemeta::blaze::SchemaFrame::Mode::Pointers, contents,
sourcemeta::blaze::SchemaFrame::Mode::Locations, contents,
sourcemeta::blaze::schema_walker, schema_resolver};
auto result{sourcemeta::core::JSON::make_object()};
result.assign("static", sourcemeta::core::JSON::make_object());
Expand Down
2 changes: 1 addition & 1 deletion src/self/v1/schemas/api/schemas/locations/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
],
"properties": {
"type": {
"enum": [ "resource", "anchor", "pointer", "subschema" ]
"enum": [ "resource", "anchor", "subschema" ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The generator still emits "pointer" entries but this response schema no longer allows the value. For any schema that contains a JSON pointer location, the served locations artifact will contain a "type": "pointer" entry that now fails validation against this response schema, breaking the endpoint (or leaving the schema describing output the server still produces). Remove "pointer" from the generator too, or keep it in the enum until the artifact no longer emits it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/self/v1/schemas/api/schemas/locations/response.json, line 46:

<comment>The generator still emits "pointer" entries but this response schema no longer allows the value. For any schema that contains a JSON pointer location, the served locations artifact will contain a "type": "pointer" entry that now fails validation against this response schema, breaking the endpoint (or leaving the schema describing output the server still produces). Remove "pointer" from the generator too, or keep it in the enum until the artifact no longer emits it.</comment>

<file context>
@@ -43,7 +43,7 @@
       "properties": {
         "type": {
-          "enum": [ "resource", "anchor", "pointer", "subschema" ]
+          "enum": [ "resource", "anchor", "subschema" ]
         },
         "base": {
</file context>

},
"base": {
"x-format-assertion": true,
Expand Down
42 changes: 3 additions & 39 deletions test/e2e/headless/hurl/schemas-locations.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,9 @@ jsonpath "$.static['{{base}}/test/schemas/no-id'].position[0]" == 1
jsonpath "$.static['{{base}}/test/schemas/no-id'].position[1]" == 1
jsonpath "$.static['{{base}}/test/schemas/no-id'].position[2]" == 5
jsonpath "$.static['{{base}}/test/schemas/no-id'].position[3]" == 1
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].base" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].parent" == ""
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].pointer" == "/$id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].relativePointer" == "/$id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].root" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].type" == "pointer"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].position" count == 4
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].position[0]" == 3
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].position[1]" == 3
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].position[2]" == 3
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id'].position[3]" == 51
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].base" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].parent" == ""
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].pointer" == "/$schema"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].relativePointer" == "/$schema"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].root" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].type" == "pointer"
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].position" count == 4
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].position[0]" == 2
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].position[1]" == 3
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].position[2]" == 2
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema'].position[3]" == 54
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].base" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].parent" == ""
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].pointer" == "/type"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].relativePointer" == "/type"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].root" == "{{base}}/test/schemas/no-id"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].type" == "pointer"
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].position" count == 4
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].position[0]" == 4
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].position[1]" == 3
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].position[2]" == 4
jsonpath "$.static['{{base}}/test/schemas/no-id#/type'].position[3]" == 18
jsonpath "$.static['{{base}}/test/schemas/no-id#/$id']" not exists
jsonpath "$.static['{{base}}/test/schemas/no-id#/$schema']" not exists
jsonpath "$.static['{{base}}/test/schemas/no-id#/type']" not exists

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
```
Expand Down
42 changes: 3 additions & 39 deletions test/e2e/html/hurl/schemas-locations.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -30,45 +30,9 @@ jsonpath "$.static['{{base}}/test/v2.0/schema'].position[0]" == 1
jsonpath "$.static['{{base}}/test/v2.0/schema'].position[1]" == 1
jsonpath "$.static['{{base}}/test/v2.0/schema'].position[2]" == 5
jsonpath "$.static['{{base}}/test/v2.0/schema'].position[3]" == 1
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].base" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].parent" == ""
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].pointer" == "/$id"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].relativePointer" == "/$id"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].root" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].type" == "pointer"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].position" count == 4
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].position[0]" == 3
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].position[1]" == 3
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].position[2]" == 3
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id'].position[3]" == 49
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].base" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].parent" == ""
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].pointer" == "/$schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].relativePointer" == "/$schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].root" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].type" == "pointer"
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].position" count == 4
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].position[0]" == 2
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].position[1]" == 3
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].position[2]" == 2
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema'].position[3]" == 54
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].base" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].baseDialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].dialect" == "http://json-schema.org/draft-07/schema#"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].parent" == ""
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].pointer" == "/type"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].relativePointer" == "/type"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].root" == "{{base}}/test/v2.0/schema"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].type" == "pointer"
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].position" count == 4
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].position[0]" == 4
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].position[1]" == 3
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].position[2]" == 4
jsonpath "$.static['{{base}}/test/v2.0/schema#/type'].position[3]" == 19
jsonpath "$.static['{{base}}/test/v2.0/schema#/$id']" not exists
jsonpath "$.static['{{base}}/test/v2.0/schema#/$schema']" not exists
jsonpath "$.static['{{base}}/test/v2.0/schema#/type']" not exists

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
```
Expand Down
Loading