Skip to content

Path-absolute local refs with path-only root ids resolve outside the input root #3206

Description

@koxudaxi

Related to #3159.

When a local JSON Schema directory uses path-only $id values such as /schemas/v1/formats/canonical/_base.json, path-absolute $ref values in that URI space can be resolved as filesystem-root paths instead of paths under the local input root.

Minimal shape:

{
  "$id": "/schemas/v1/formats/canonical/_base.json",
  "properties": {
    "platform_extensions": {
      "items": { "$ref": "/schemas/v1/core/platform-extension-ref.json" }
    }
  }
}

If the local input root contains formats/canonical/_base.json and core/platform-extension-ref.json, the ref should resolve to core/platform-extension-ref.json, not /schemas/v1/core/platform-extension-ref.json on the host filesystem.

This blocks local generation for schema trees like AdCP dist/schemas/3.1.0-beta.x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions