feat: add typespec schemas for modules (#233)
* feat: add typespec for bling and akmods for testing * chore: temporarily change module source to dev branch * feat: add missing module typespecs from blue-build/schema * feat: add schemas for default-flatpaks module * chore: annotate some parameters as optional * fix: typo in default-flatpaks schema * feat: add schema for files module * feat: add script module schema * feat: add signing module schema * docs: add module.yml docs etc. * fix(default-flatpaks): don't capitalize string in typespec * feat: add schemas for gnome-extensions * fix(files): properly declare string: string record type * chore: add tsp for gschema-overrides * chore: tsp for systemd module * chore: add link to systemd tsp to module.yml * chore: add tsp for yafti module * feat: add docstrings for files module * feat: add tsp for chezmoi module * feat: docstrings for akmods tsp * feat: docstrings for bling tsp * feat: docstrings for default flatpaks tsp * fix: link to files module docs page in files module tsp * feat: docstrings for fonts module tsp * feat: add docstrings for gnome extensions tsp * feat: docstrings for gschema overrides tsp * feat: docstrings for rpm ostree tsp * feat: docstrings for script tsp * feat: docstrings for signing module * feat: docstrings for systemd tsp * feat: docstrings for yafti module * fix: typo in files tsp * feat: typespec for brew module * chore: update rpm ostree tsp for keys: prop * fix: use typespec to declare default values * fix: errors from previous commit * docs: add typespec instructions * docs: chore: add typespec docs link for docs syntax * chore: switch to semicolon for ending property definitions * docs: fix: typo inlude -> include * feat: tsp for justfiles module * chore: change links to reference main branch --------- Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
This commit is contained in:
parent
1f17dbaa9d
commit
be6e4ba5bd
32 changed files with 404 additions and 11 deletions
49
modules/default-flatpaks/default-flatpaks.tsp
Normal file
49
modules/default-flatpaks/default-flatpaks.tsp
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import "@typespec/json-schema";
|
||||
using TypeSpec.JsonSchema;
|
||||
|
||||
@jsonSchema("/modules/default-flatpaks.json")
|
||||
model DefaultFlatpaksModule {
|
||||
/** The default-flatpaks module can be used to install or uninstall flatpaks from a configurable remote on every boot.
|
||||
* https://blue-build.org/reference/modules/default-flatpaks/
|
||||
*/
|
||||
type: "default-flatpaks";
|
||||
|
||||
/** Whether to send a notification after the install/uninstall is finished. */
|
||||
notify?: boolean = false;
|
||||
|
||||
/** Configuration for system flatpaks. */
|
||||
system?: {
|
||||
/** URL of the repo to add. Defaults to Flathub's URL. */
|
||||
"repo-url"?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
|
||||
/** Name for the repo to add. */
|
||||
"repo-name"?: string = "flathub";
|
||||
|
||||
/** Pretty title for the repo to add. Not set by default. */
|
||||
"repo-title"?: string;
|
||||
|
||||
/** List of Flatpak IDs to install from the repo. */
|
||||
install?: Array<string>;
|
||||
|
||||
/** List of Flatpak IDs to remove. */
|
||||
remove?: Array<string>;
|
||||
};
|
||||
|
||||
/** Configuration for user flatpaks. */
|
||||
user?: {
|
||||
/** URL of the repo to add. Defaults to Flathub's URL. */
|
||||
"repo-url"?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
|
||||
/** Name for the repo to add. */
|
||||
"repo-name"?: string = "flathub";
|
||||
|
||||
/** Pretty title for the repo to add. Not set by default. */
|
||||
"repo-title"?: string;
|
||||
|
||||
/** List of Flatpak IDs to install from the repo. */
|
||||
install?: Array<string>;
|
||||
|
||||
/** List of Flatpak IDs to remove. */
|
||||
remove?: Array<string>;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
name: default-flatpaks
|
||||
shortdesc: The default-flatpaks module can be used to install or uninstall flatpaks from a configurable remote on every boot.
|
||||
readme: https://raw.githubusercontent.com/blue-build/modules/main/modules/default-flatpaks/README.md
|
||||
typespec: https://raw.githubusercontent.com/blue-build/modules/main/modules/default-flatpaks/default-flatpaks.tsp
|
||||
example: |
|
||||
modules: # configured multiple times to highlight how options are overridden
|
||||
- type: default-flatpaks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue