From e5282849094c3eb12dab5cae74e8cfa26bf225f1 Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Mon, 28 Oct 2024 23:45:06 -0400 Subject: [PATCH] fix(test): Remove oneOf to test verbosity of basic output --- fetchModuleSchemas.js | 4 ---- src-tsp/main.tsp | 3 --- 2 files changed, 7 deletions(-) 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,