feat: add codegen and refactor mkv models

This commit is contained in:
2025-03-22 03:11:40 +08:00
parent f921819d2a
commit 0b681d4fd1
5 changed files with 345 additions and 274 deletions

View File

@@ -390,6 +390,9 @@ function generateMkvSchemaHierarchy(elements_: EbmlElementType[]) {
: meta.primitive(v.name);
if (v.maxOccurs !== 1) {
expr = `${expr}.array()`;
if (v.maxOccurs !== 1 && v.minOccurs === 1 && !v.default) {
expr = `${expr}.atLeastLength(1)`
}
idMulti.add(v.name);
}
if (v.default) {