From 27ff5d3bc594715ab0f0524ade72f2eae097d2cd Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Sun, 13 Oct 2024 20:36:14 -0400 Subject: [PATCH] fix: Seperate normal modules into a type discriminated union --- src-tsp/main.tsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src-tsp/main.tsp b/src-tsp/main.tsp index 19e4687..df8b981 100644 --- a/src-tsp/main.tsp +++ b/src-tsp/main.tsp @@ -87,8 +87,13 @@ model ModuleList { } @jsonSchema("module-v1.json") -@oneOf union ModuleType { + normal: NormalModules, + custom: CustomModule, +} + +@discriminator("type") +union NormalModules { akmods: AkmodsModule, bling: BlingModule, brew: BrewModule, @@ -106,7 +111,6 @@ union ModuleType { signing: SigningModule, systemd: SystemdModule, yafti: YaftiModule, - custom: CustomModule, } @discriminator("type")