Add project settings schema to schema_generator CLI (#44321)

Release Notes:

- Added project settings schema to the schema_generator CLI. This allows
for exporting the project settings schema as JSON for use in other
tools.
This commit is contained in:
Dan Greco authored and GitHub committed 2025-12-16 10:48:14 -05:00
1 parent 84d3f9cc1a
commit 1229c49656
3 files changed
+8

No files matched your search

Generated
+1
View File
@@ -14249,6 +14249,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
"settings",
"theme",
]
+1
View File
@@ -15,4 +15,5 @@ env_logger.workspace = true
schemars = { workspace = true, features = ["indexmap2"] }
serde.workspace = true
serde_json.workspace = true
settings.workspace = true
theme.workspace = true
+6
View File
@@ -1,6 +1,7 @@
use anyhow::Result;
use clap::{Parser, ValueEnum};
use schemars::schema_for;
use settings::ProjectSettingsContent;
use theme::{IconThemeFamilyContent, ThemeFamilyContent};
#[derive(Parser, Debug)]
@@ -14,6 +15,7 @@ pub struct Args {
pub enum SchemaType {
Theme,
IconTheme,
Project,
}
fn main() -> Result<()> {
@@ -30,6 +32,10 @@ fn main() -> Result<()> {
let schema = schema_for!(IconThemeFamilyContent);
println!("{}", serde_json::to_string_pretty(&schema)?);
}
SchemaType::Project => {
let schema = schema_for!(ProjectSettingsContent);
println!("{}", serde_json::to_string_pretty(&schema)?);
}
}
Ok(())