Skip to content

Fix old draft-07 schema in 2020 schema#13

Open
tarjelavik wants to merge 2 commits into
linked-art:masterfrom
uib-ub:fix-contextstringorarray
Open

Fix old draft-07 schema in 2020 schema#13
tarjelavik wants to merge 2 commits into
linked-art:masterfrom
uib-ub:fix-contextstringorarray

Conversation

@tarjelavik

@tarjelavik tarjelavik commented Jun 29, 2026

Copy link
Copy Markdown

Fix #12, #8

AI helped fix and write this issue... :-/

The problem: schema/core.json declares $schema: draft 2020-12, but the ContextStringOrArray definition used the draft-07 tuple form of items (an array of subschemas):

"items": [
    { "type": "string", "format": "uri" }
]

In draft 2020-12, items must be a single schema (object or boolean) and applies to all array elements; the tuple/positional form was renamed to prefixItems. That's why the metaschema rejected /definitions/ContextStringOrArray/anyOf/1/items with "want boolean or object, but got array."

Since the intent is "an array of context URI strings," I changed it to apply the subschema to every item:

{
                    "title": "Linked Art with Extensions",
                    "type": "array",
                    "items": {
                        "type": "string",
                        "format": "uri"
                    }
                }

@tarjelavik

tarjelavik commented Jun 29, 2026

Copy link
Copy Markdown
Author

I did not remove the duplicate prop in core.json, "referres_to_by". It was part of the PR to "main repo.

Removed in latest commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Online validation broken?

1 participant