Repository navigation
Generate only schema.org and OpenActive terms from the schema.org vocabulary - #70
Merged
Merged
Conversation
…abulary Recent schema.org releases (since data-models 3.0.10, which uses 30.1) also declare classes and properties from other vocabularies that schema.org terms are mapped to, such as snomed:, gs1:, dct:, og:, unece: and fibo-*. data-models 3.0.9's vocabulary had none. The generators turned them into library code, which broke every library: - classes named after SNOMED codes (e.g. "63653004") are invalid in TypeScript, PHP and Ruby - dct:description, gs1:description and og:description produce duplicate "Description" members in the property enumeration (45 duplicates in C#, 3 duplicate constants in PHP) Skip non-schema.org classes and properties when reading the schema.org vocabulary, drop links from schema.org classes to the skipped parent classes (otherwise resolving primary parents never completes), and keep only schema.org and OpenActive properties in the property enumeration. Against data-models 3.0.10 the generated libraries now differ from 3.0.9 only by new schema.org terms (and schema:Quantity, which schema.org 30.1 turned into a data type). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
hkir-dev
approved these changes
Oct 21, 2026
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.
Summary
Since data-models 3.0.10 (schema.org 30.1), the generated model libraries are broken. Recent schema.org releases also declare classes and properties from other vocabularies that schema.org terms are mapped to (
snomed:,gs1:,dct:,og:,unece:,fibo-*and others: 77 classes and about 156 properties). The vocabulary in data-models 3.0.9 had none. The generators turn them into library code:src/oa/63653004.ts: the build fails with 147 errors63653004.php: "unexpected integer"), andPropertyEnumeration.phpdefinesDescriptionthree times (schema:,dct:,gs1:/og:description)PropertyEnumeration.cshas 45 duplicate member names (Address,Audience,ContactPoint, …)Changes
schema:terms.schema:Brand→cmns-cls:Classifier); without this, resolving primary parents never completes.schema:DataType→rdfs:Class, which predates these releases, is unaffected.OpenActive extensions (beta, test interface) are not affected.
Verification
Generated locally against data-models 3.0.10 and the current beta namespace:
Quantity, which schema.org 30.1 turned into a data typenpm run buildsrc/test/data-models-examples/spec files; the same 3 errors occur with data-models 3.0.9 and the current models-libruby -con all generated filesphp -lon all generated filesClass.phpandFloat.phpfail (reserved words); the same with data-models 3.0.9PropertyEnumeration.csWhen merged
Re-run the "Update Data Model" workflow in OpenActive.NET, models-php, models-ruby and models-ts; they check out this repository's default branch. The pre-existing issues above (models-ts example specs, PHP
Class/Float) are separate.