feat(docs): generated bilingual Schema reference (L0 Core: EntitySet/DataSet/Link/Storage)#48
Merged
Merged
Conversation
Add a Schema reference to the docs site, organized per the UModel standard's
L0 Core abstractions — EntitySet / DataSet / Link / Storage — with shared
building blocks (metadata, schema, telemetry_data, field_spec, metric, link)
documented once and referenced from each schema.
Generated from the source schemas (schemas/core + schemas/includes) by
tools/docs/gen_schema_reference.py so the reference cannot drift. Per-schema
pages show the standard envelope note, inheritance links, and a depth-limited
bilingual spec table; internal-only reference links are stripped.
- tools/docs/gen_schema_reference.py: generator (+ --check drift mode)
- docs/{en,zh}/reference/schema/**: 25 generated pages per locale
- docs/.vitepress/config/schema-sidebar.json + en.ts/zh.ts: sidebar wiring
- Makefile: `make docs-schema` regenerates; docs-schema-check added to `make ci`
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
Adds a Schema reference to the docs site, organized per the UModel standard's layering. The schemas we have today are all L0 Core, so the reference documents them grouped by the four base abstractions — EntitySet · DataSet · Link · Storage — and frames L1 (Semantic Conventions) / L2 (Domain Profiles) / L3 (Conformance) as the standard's roadmap.
Generated, not hand-written
Per the contribution spec ("涉及生成代码时由生成器产生,不手动修改 generated artifacts"), the reference is produced from the source schemas by a generator, so it can't drift:
tools/docs/gen_schema_reference.py— readsschemas/core/**+schemas/includes/**, emits bilingual Markdown + a sidebar fragment.--checkmode is a CI drift gate.make docs-schemaregenerates;docs-schema-checkis wired intomake ci(fails if the committed output is stale).Structure
25 pages per locale (en + zh). Design choices that keep it readable: the standard envelope (
kind/metadata/schema) is documented once on shared-types and linked, each schema page shows only its distinguishingspecplus an "inherits" link, tables are depth-limited, and well-known arrays (fields/labels/metrics) collapse to a shared-type link instead of re-inlining.Notes
alidocs.dingtalk.comreferences in schema descriptions are removed from the public output.entity_set.id_generatorhas a malformeden_usblock in the source schema, so its English row falls back to the Chinese text. Fixing it means editingschemas/+ re-runningmake expand(regenerates SDKs) — out of scope for a docs PR; flagging for a follow-up.Verification
pnpm -C docs buildclean — 0 dead links (all generated cross-links + shared-type anchors validate).make docs-schema-checkclean; regeneration is idempotent (no diff)./{en,zh}/reference/schema/get the category sidebar; "Schema" added under Reference.