Incorrect `$anchor` example in documentation
Whathecode opened this issue · 2 comments
The current documentation on $anchor includes the following code sample:
{
"$id": "https://example.com/schemas/address",
"type": "object",
"properties": {
"street_address":
{
"$anchor": "#street_address",
"type": "string"
},
"city": { "type": "string" },
"state": { "type": "string" }
},
"required": ["street_address", "city", "state"]
}
Note the anchor name: "$anchor": "#street_address". This shouldn't include the hash: "$anchor": "street_address".
The specification for reference:
The "$anchor" keyword is used to specify such a fragment. It is an identifier keyword that can only be used to create plain name fragments.
If present, the value of this keyword MUST be a string, which MUST start with a letter ([A-Za-z]), followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), or periods ("."). [CREF8]
Oops. Yet again seemingly added this to the wrong repo 🤷 . In my defence, why are there so many 😲 . Opened in what I hope is the correct repo and will try to fix there. Closing it here.
Oops. Yet again seemingly added this to the wrong repo 🤷 . In my defence, why are there so many 😲 . Opened in what I hope is the correct repo and will try to fix there. Closing it here.
mmm yeah, it's a frustration @Whathecode. The website is actually 3 repos, 4 if you count the spec git submodule for the main site repo. It's confusing and we can do better to make it clearer.
It's ended up this way due to inheriting projects and no one having the time to rebuild them all together. Well aware of the work to be done! 😅