Skip to content

[Ontology] Flatten concept declarations in ontology spec#257

Merged
jochenchrist merged 3 commits into
apache:mainfrom
jochenchrist:fix/ontology-extends-snippet-indent
Jul 24, 2026
Merged

[Ontology] Flatten concept declarations in ontology spec#257
jochenchrist merged 3 commits into
apache:mainfrom
jochenchrist:fix/ontology-extends-snippet-indent

Conversation

@jochenchrist

@jochenchrist jochenchrist commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Changes the ontology component syntax so the concept name is the value of concept: instead of a nested object with a name: key.

Before:

name: EnterpriseOntology
ontology:
  - concept:
      name: SocialSecurityNr
      type: ValueType
      extends: [Integer]
  - concept:
      name: Employee
      type: EntityType
      extends: [Person]

After:

name: EnterpriseOntology
ontology:
  - concept: SocialSecurityNr
    type: ValueType
    extends: [Integer]
  - concept: Employee
    type: EntityType
    extends: [Person]
  • ontology.md: all YAML snippets use the flattened form; the component/concept schema tables are merged into one table with concept as the name field and relationships alongside it.
  • ontology.json: OntologyComponent now takes concept as a string plus the former Concept fields inline; the separate Concept def is removed; concept and type are required.
  • examples/flights.yaml: converted to the flattened form; content is otherwise unchanged and validates against the updated schema.
  • Fixes in existing snippets: a verbalizes value that was a string instead of an array, missing required verbalizes in the OrderLineItem example, a missing list dash in a derived_by example, and a few typos.

All complete snippets in the doc and the flights example validate against the updated schema.

🤖 Generated with Claude Code

@jochenchrist jochenchrist changed the title Flatten concept declarations in extends example snippet Flatten concept declarations in ontology spec Jul 23, 2026
@jochenchrist jochenchrist changed the title Flatten concept declarations in ontology spec [Ontology] Flatten concept declarations in ontology spec Jul 23, 2026
@kurtStirewalt

Copy link
Copy Markdown
Contributor

@jochenchrist , I like this change! Please note that there is a larger ontology in examples/flights.yaml that will fail to validate if we merge this PR without updating it. Let me know if you'd like us to update it and share it with you for inclusion.

@jochenchrist

Copy link
Copy Markdown
Contributor Author

@jochenchrist , I like this change! Please note that there is a larger ontology in examples/flights.yaml that will fail to validate if we merge this PR without updating it. Let me know if you'd like us to update it and share it with you for inclusion.

flights.yaml is now updated.

@kurtStirewalt kurtStirewalt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jochenchrist
jochenchrist merged commit 6cb9aaa into apache:main Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants