Change record status: 
Project: 
Introduced in branch: 
1.x
Introduced in version: 
1.0.0-beta1
Description: 

Context

See https://opis.io/json-schema/2.x/formats.html#uri vs https://opis.io/json-schema/2.x/formats.html#uri-reference.

format: uri can contain ONLY absolute URLs, and format: uri-reference can contain BOTH absolute and relative URLs.

(Note that you can restrict further which protocols are allowed for a given URL by specifying a x-allowed-schemes — see https://www.drupal.org/node/3542579.)

This is an explicit decision available to both SDC developers (when they write the schema) and code component developers, in the UI where code component props are defined:

Previous contradictory behavior

Before #3540470: Require 6.x version of `justinrainbow/json-schema` package to get correct JSON Schema validation, the JSON schema validation infrastructure was incorrectly considering relative URLs as valid. This defeats the purpose of having format: uri-reference at all.

Changes needed in code components and SDCs

Because this now behaves correctly, any SDC or code component that is intended to present internal links MUST use format: uri-reference.

ℹ️ This is being clarified in the code component developer UI at #3542890: Code component editor UI "Link" prop type allows picking "full" vs "relative path", but is misleading.

Impacts: 
Site builders, administrators, editors
Module developers
Themers