Repository navigation
docs(examples): remove stale $anchor mention from job posting example - #2635
Closed
NopeCharon wants to merge 1 commit into
Closed
NopeCharon wants to merge 1 commit into
NopeCharon wants to merge 1 commit into
Conversation
The introduction to the "Job posting" example on the JSON Schema examples page says the schema "also uses the `$anchor` keyword for defining an anchor", but the schema shown below it contains no `$anchor`. The root-level `"$anchor": "JobPosting"` that sentence described was intentionally removed from the example (together with the similar one in the Movie example) when the examples were revised, because an anchor on a root schema that already has an `$id` adds nothing. The sentence was left behind, which confuses readers who are looking for the keyword in the example. Drop the leftover sentence so the description matches the schema. The Ecommerce system example on the same page remains the place that demonstrates `$anchor` with a real `$ref` to it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2635 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 737 737
Branches 229 229
=========================================
Hits 737 737 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Documentation fix
Issue Number:
Screenshots/videos:
N/A (one sentence removed from the "Job posting" example on
/learn/json-schema-examples).If relevant, did you update the documentation?
Yes, this PR is the documentation update:
pages/learn/json-schema-examples.md.Summary
The introduction to the "Job posting" example says the schema "also uses the
$anchorkeyword for defining an anchor", but the schema below it has no$anchor, which confuses readers.The example used to end with a root-level
"$anchor": "JobPosting". That anchor was removed on purpose (along with a similar one in the Movie example) when the examples were revised in a5172a3, because an anchor on a root schema that already has an$idadds nothing and nothing referenced it. The sentence describing it was left behind.This PR removes the leftover sentence so the description matches the schema. Adding the anchor back would only bring back a keyword that isn't used. The "Ecommerce system" example on the same page already shows
$anchorproperly, with a$refthat points to it.Does this PR introduce a breaking change?
No.
Checklist
Please ensure the following tasks are completed before submitting this pull request.