Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: id with absolute uri-reference results in incorrect reference resolution #104

Closed
1 task done
OptimumCode opened this issue May 3, 2024 · 0 comments · Fixed by #105
Closed
1 task done

Bug: id with absolute uri-reference results in incorrect reference resolution #104

OptimumCode opened this issue May 3, 2024 · 0 comments · Fixed by #105
Assignees
Labels
bug Something isn't working

Comments

@OptimumCode
Copy link
Owner

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When the root id is https://example.com/schemas/unevaluated-items-are-disallowed the inner id /schemas/unevaluated-items-are-allowed results in https://example.com/schemas//schemas/unevaluated-items-are-allowed

Expected Behavior

When the root id is https://example.com/schemas/unevaluated-items-are-disallowed the inner id /schemas/unevaluated-items-are-allowed results in https://example.com/schemas/unevaluated-items-are-allowed

JSON schema

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "https://example.com/schemas/unevaluated-items-are-disallowed",
  "$ref": "/schemas/unevaluated-items-are-allowed",
  "$recursiveAnchor": true,
  "unevaluatedItems": false,
  "$defs": {
    "/schemas/unevaluated-items-are-allowed": {
      "$schema": "https://json-schema.org/draft/2019-09/schema",
      "$id": "/schemas/unevaluated-items-are-allowed",
      "$recursiveAnchor": true,
      "type": "array",
      "items": [
        {
          "type": "string"
        },
        {
          "$ref": "#"
        }
      ]
    }
  }
}

Library version

0.0.13

Anything else?

Found with the help of bowtie report because json-schema-org/JSON-Schema-Test-Suite#731 was added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant