mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
feat(asc): add json schema cmd and output
This commit adds a command to output a JSON Schema for the applications.yaml file maintained in the komorebi-application-specific-configuration repo, and also adds an up-to-date version of the JSON Schema as a file in the root of this repository so that users can reference it as an autocompletion source.
This commit is contained in:
@@ -1087,6 +1087,9 @@ enum SubCommand {
|
||||
/// Fetch the latest version of applications.yaml from komorebi-application-specific-configuration
|
||||
#[clap(alias = "fetch-asc")]
|
||||
FetchAppSpecificConfiguration,
|
||||
/// Generate a JSON Schema for applications.yaml
|
||||
#[clap(alias = "asc-schema")]
|
||||
ApplicationSpecificConfigurationSchema,
|
||||
/// Generate a JSON Schema of subscription notifications
|
||||
NotificationSchema,
|
||||
/// Generate a JSON Schema of socket messages
|
||||
@@ -2095,6 +2098,11 @@ Stop-Process -Name:whkd -ErrorAction SilentlyContinue
|
||||
output_file.display()
|
||||
);
|
||||
}
|
||||
SubCommand::ApplicationSpecificConfigurationSchema => {
|
||||
with_komorebic_socket(|| {
|
||||
send_message(&SocketMessage::ApplicationSpecificConfigurationSchema.as_bytes()?)
|
||||
})?;
|
||||
}
|
||||
SubCommand::NotificationSchema => {
|
||||
with_komorebic_socket(|| send_message(&SocketMessage::NotificationSchema.as_bytes()?))?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user