diff --git a/fetchModuleSchemas.js b/fetchModuleSchemas.js index 3e11562..f6a86af 100644 --- a/fetchModuleSchemas.js +++ b/fetchModuleSchemas.js @@ -47,11 +47,7 @@ for (const module of modules) { fs.writeFileSync(`${modulesDir}/index.tsp`, moduleImports.map(m => `import "./${m}";`).join("\n") + ` -import "@typespec/json-schema"; -using TypeSpec.JsonSchema; - -@oneOf union RepoModule { ${moduleModels.map(m => ` ${m}Module`).join(",\n")} }` diff --git a/src-tsp/main.tsp b/src-tsp/main.tsp index f31ef2f..01897cb 100644 --- a/src-tsp/main.tsp +++ b/src-tsp/main.tsp @@ -66,7 +66,6 @@ model StageList { stages: Array; } -@oneOf union StageEntry { Stage, ImportedModule, @@ -103,14 +102,12 @@ model ModuleList { modules: Array; } -@oneOf union ModuleEntry { Module, ImportedModule, } @jsonSchema("module-v1.json") -@oneOf union Module { RepoModule, CustomModule,