-
-
Notifications
You must be signed in to change notification settings - Fork 338
Description
We've made several improvements to dynamic references. We determined that the bookending requirement is unnecessary. So, we removed it (#1064), which made the initial resolution step unnecessary. So, we removed that too (#1140), which makes it unnecessary for a dynamic reference to be a URI at all.
So, now I'm proposing that we remove the leading #
from dynamic references. There's no reason for these values to look like URIs. The only reason to keep them is that changing it would be a breaking change. The dynamic reference changes we've made already are technically breaking changes, but they are pretty low impact. If you've been using dynamic references correctly, you shouldn't notice the change in almost all cases. This change would be a little more disruptive.
Option 1 - Remove the leading #
Pros: This change should help reduce confusion about this feature. When it looks like a URI, people expect URI resolution-like behavior and that's not the case for this feature.
Cons: Users would have to make a slight change their schemas when upgrading to the stable release: "$dynamicRef": "#foo"
=> "$dynamicRef": "foo"
.
Option 2 - Without leading #
is preferred, with leading #
is deprecated
Pros: Users don't need to change their schemas in order upgrade, but new schemas can use the new notation.
Cons: Until schema linters are widely used, there's no good way to give users feedback that the #
notation is deprecated which means people are likely to continue to use it unnecessarily and it will likely never go away completely. Also, we'll never be able to remove the #
notation unless we have move to a v2, but ideally we'll never have to do that.
Option 3 - Do nothing
Pros: No schemas or implementations need to change.
Cons: We're stuck with this useless historical artifact.