Skip to content

Add an inheritance example (allOf + $ref), not just composition #7

@LukasOro

Description

@LukasOro

examples/PersonWithAddress.schema.json demonstrates composition (embeds Address via $ref + scoped @context) but there is no inheritance example using allOf + $ref to a parent schema (e.g. Employee extends Person).

This is the most-requested "object-oriented" capability and currently has no worked example.

Ask — add examples/:

  • Employee.schema.json with allOf: [{ $ref: Person.schema.json }] and a @context array that
    imports the parent context, plus its own terms.
  • an instance (e.g. alice.json) and the expected RDF (Turtle) output.

Acceptance: new files build/validate and (ideally) load in the playgrounds.

Metadata

Metadata

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions