diff --git a/src-tsp/main.tsp b/src-tsp/main.tsp index c656615..0cac2df 100644 --- a/src-tsp/main.tsp +++ b/src-tsp/main.tsp @@ -62,7 +62,13 @@ model StageList { * A list of [stages](https://blue-build.org/reference/stages/) that are executed before the build of the final image. * This is useful for compiling programs from source without polluting the final bootable image. */ - stages: Array; + stages: Array; +} + +@oneOf +union StageEntry { + Stage, + ImportedModule, } @jsonSchema("stage-v1.json") @@ -92,14 +98,19 @@ 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; + modules: Array; +} + +union ModuleEntry { + Module, + ImportedModule, } @jsonSchema("module-v1.json") +@oneOf union Module { RepoModule, CustomModule, - ImportedModule, } model ModuleDefaults {