mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-16 00:51:02 +02:00
feat(config): json schema support
This PR includes the necessary code changes, CI changes and documentation to generate and deploy a full JSON schema for each release and the master branch, which can be used within config files for autocomplete and type checking.
This commit is contained in:
parent
a47ef0c763
commit
36d724f148
36 changed files with 230 additions and 15 deletions
|
@ -16,6 +16,7 @@ use tracing::trace;
|
|||
/// see [here](script).
|
||||
/// For information on styling, please see the [styling guide](styling-guide).
|
||||
#[derive(Debug, Default, Deserialize, Clone)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
pub struct CommonConfig {
|
||||
/// Sets the unique widget name,
|
||||
/// allowing you to target it in CSS using `#name`.
|
||||
|
@ -160,6 +161,7 @@ pub struct CommonConfig {
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
pub enum TransitionType {
|
||||
None,
|
||||
Crossfade,
|
||||
|
@ -169,6 +171,7 @@ pub enum TransitionType {
|
|||
|
||||
#[derive(Debug, Default, Deserialize, Clone, Copy)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
pub enum ModuleOrientation {
|
||||
#[default]
|
||||
#[serde(alias = "h")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue