Revert "fix: Remove type from ModuleDefaults, combine unions"

This reverts commit 31ae9cf6bf.
This commit is contained in:
Gerald Pinder 2024-10-13 21:08:45 -04:00
parent 31ae9cf6bf
commit 706f58f294
2 changed files with 15 additions and 7 deletions

View file

@ -53,7 +53,7 @@ model Recipe {
*
* Each item in this list should have at least a `type:` or be specified to be included from an external file in the `recipes/` directory with `from-file:`.
*/
modules: Array<Module | ImportedModule>;
modules: Array<ModuleType | ImportedModule>;
}
@jsonSchema("stage-list-v1.json")
@ -82,7 +82,7 @@ model Stage {
/**
* The list of modules to execute. The exact same syntax used by the main recipe `modules:` property.
*/
modules: Array<Module | ImportedModule>;
modules: Array<ModuleType | ImportedModule>;
}
@jsonSchema("module-list-v1.json")
@ -92,11 +92,17 @@ model ModuleList {
*
* Each item in this list should have at least a `type:` or be specified to be included from an external file in the `recipes/` directory with `from-file:`.
*/
modules: Array<Module | ImportedModule>;
modules: Array<ModuleType | ImportedModule>;
}
@jsonSchema("module-v1.json")
union Module {
union ModuleType {
normal: NormalModules,
custom: CustomModule,
}
@discriminator("type")
union NormalModules {
akmods: AkmodsModule,
bling: BlingModule,
brew: BrewModule,
@ -114,11 +120,13 @@ union Module {
signing: SigningModule,
systemd: SystemdModule,
yafti: YaftiModule,
custom: CustomModule,
}
@discriminator("type")
model ModuleDefaults {
model Module {
/** This is not a built-in module. */
type: string;
/** Whether to disabling caching for this layer.
* https://blue-build.org/reference/module/#no-cache-optional
*/