Skip to content

docs(examples): remove stale $anchor mention from job posting example - #2635

Closed
NopeCharon wants to merge 1 commit into
json-schema-org:mainfrom
NopeCharon:docs/2363-job-posting-anchor
Closed

NopeCharon wants to merge 1 commit into
json-schema-org:mainfrom
NopeCharon:docs/2363-job-posting-anchor

Conversation

@NopeCharon

Copy link
Copy Markdown

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 $anchor keyword 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 $id adds 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 $anchor properly, with a $ref that points to it.

Does this PR introduce a breaking change?

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

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

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ff13109) to head (898fb2a).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

1 active deployment
Preview — 898fb2a2 Deployed Nov 7, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[📝 Docs]: Job Posting Example needs $anchor

2 participants