diff --git a/Cargo.lock b/Cargo.lock index 28e0a3d65..83727039b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2620,6 +2620,7 @@ dependencies = [ "pglt_text_size", "pglt_typecheck", "rustc-hash 2.1.0", + "schemars", "serde", "serde_json", "sqlx", diff --git a/crates/pglt_analyse/Cargo.toml b/crates/pglt_analyse/Cargo.toml index 4574d90c1..96c4ea880 100644 --- a/crates/pglt_analyse/Cargo.toml +++ b/crates/pglt_analyse/Cargo.toml @@ -27,4 +27,5 @@ schemars = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"], optional = true } [features] -serde = ["dep:serde", "dep:schemars", "dep:biome_deserialize", "dep:biome_deserialize_macros"] +schema = ["dep:schemars"] +serde = ["dep:serde", "dep:biome_deserialize", "dep:biome_deserialize_macros"] diff --git a/crates/pglt_analyse/src/categories.rs b/crates/pglt_analyse/src/categories.rs index 0b539eac4..d13e1a3da 100644 --- a/crates/pglt_analyse/src/categories.rs +++ b/crates/pglt_analyse/src/categories.rs @@ -2,10 +2,8 @@ use enumflags2::{BitFlags, bitflags}; use std::borrow::Cow; #[derive(Copy, Clone, Debug, Eq, PartialEq)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum RuleCategory { /// This rule performs static analysis of the source code to detect /// invalid or error-prone patterns, and emits diagnostics along with @@ -26,10 +24,8 @@ pub const SUPPRESSION_ACTION_CATEGORY: &str = "quickfix.suppressRule"; /// /// [CodeActionKind]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind #[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum ActionCategory { /// Base kind for quickfix actions: 'quickfix'. /// @@ -110,10 +106,8 @@ impl ActionCategory { /// /// [Check the LSP spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind) for more information: #[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum RefactorKind { /// This action describes a refactor with no particular sub-category None, @@ -150,10 +144,8 @@ pub enum RefactorKind { /// The sub-category of a source code action #[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum SourceActionKind { /// This action describes a source action with no particular sub-category None, @@ -282,7 +274,7 @@ impl<'de> serde::Deserialize<'de> for RuleCategories { } } -#[cfg(feature = "serde")] +#[cfg(feature = "schema")] impl schemars::JsonSchema for RuleCategories { fn schema_name() -> String { String::from("RuleCategories") diff --git a/crates/pglt_analyse/src/rule.rs b/crates/pglt_analyse/src/rule.rs index 1f70cf844..6c53a0a22 100644 --- a/crates/pglt_analyse/src/rule.rs +++ b/crates/pglt_analyse/src/rule.rs @@ -271,8 +271,8 @@ impl RuleDiagnostic { } #[derive(Debug, Clone, Eq)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, schemars::JsonSchema))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] +#[cfg_attr(feature = "serde", derive(serde::Serialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum RuleSource { /// Rules from [Squawk](https://squawkhq.com) Squawk(&'static str), diff --git a/crates/pglt_cli/Cargo.toml b/crates/pglt_cli/Cargo.toml index d4ccc5e1f..204d20918 100644 --- a/crates/pglt_cli/Cargo.toml +++ b/crates/pglt_cli/Cargo.toml @@ -55,8 +55,6 @@ tikv-jemallocator = "0.6.0" [lib] doctest = false -[features] - [[bin]] name = "pglt" path = "src/main.rs" diff --git a/crates/pglt_commands/Cargo.toml b/crates/pglt_commands/Cargo.toml index 2507b9147..972158aee 100644 --- a/crates/pglt_commands/Cargo.toml +++ b/crates/pglt_commands/Cargo.toml @@ -19,5 +19,3 @@ sqlx.workspace = true [lib] doctest = false - -[features] diff --git a/crates/pglt_completions/Cargo.toml b/crates/pglt_completions/Cargo.toml index eec3d903e..4c8e6ef26 100644 --- a/crates/pglt_completions/Cargo.toml +++ b/crates/pglt_completions/Cargo.toml @@ -33,5 +33,3 @@ pglt_test_utils.workspace = true [lib] doctest = false - -[features] diff --git a/crates/pglt_console/Cargo.toml b/crates/pglt_console/Cargo.toml index ab4ce461e..2b5cfa864 100644 --- a/crates/pglt_console/Cargo.toml +++ b/crates/pglt_console/Cargo.toml @@ -25,7 +25,8 @@ unicode-width = { workspace = true } trybuild = "1.0.99" [features] -serde_markup = ["serde", "schemars"] +schema = ["dep:schemars", "pglt_text_size/schema"] +serde = ["dep:serde"] [lib] doctest = false diff --git a/crates/pglt_console/src/markup.rs b/crates/pglt_console/src/markup.rs index 4c046ba86..b4caadf7e 100644 --- a/crates/pglt_console/src/markup.rs +++ b/crates/pglt_console/src/markup.rs @@ -11,10 +11,8 @@ use crate::fmt::{Display, Formatter, MarkupElements, Write}; /// Enumeration of all the supported markup elements #[derive(Clone, Debug, PartialEq, Eq, Hash)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub enum MarkupElement<'fmt> { Emphasis, Dim, @@ -122,10 +120,8 @@ pub struct MarkupNode<'fmt> { } #[derive(Clone, PartialEq, Eq, Hash)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct MarkupNodeBuf { pub elements: Vec>, pub content: String, @@ -181,10 +177,8 @@ impl Markup<'_> { } #[derive(Clone, Default, PartialEq, Eq, Hash)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct MarkupBuf(pub Vec); impl MarkupBuf { diff --git a/crates/pglt_diagnostics/Cargo.toml b/crates/pglt_diagnostics/Cargo.toml index c477bfd7e..ef01ba54b 100644 --- a/crates/pglt_diagnostics/Cargo.toml +++ b/crates/pglt_diagnostics/Cargo.toml @@ -15,10 +15,10 @@ version = "0.0.0" backtrace = "0.3.74" bpaf = { workspace = true } enumflags2 = { workspace = true } -pglt_console = { workspace = true, features = ["serde_markup"] } +pglt_console = { workspace = true, features = ["serde"] } pglt_diagnostics_categories = { workspace = true, features = ["serde"] } pglt_diagnostics_macros = { workspace = true } -pglt_text_edit = { workspace = true } +pglt_text_edit = { workspace = true, features = ["serde"] } pglt_text_size.workspace = true schemars = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"] } @@ -27,7 +27,7 @@ termcolor = { workspace = true } unicode-width = { workspace = true } [features] -schema = ["schemars", "pglt_text_edit/schemars", "pglt_diagnostics_categories/schemars"] +schema = ["dep:schemars", "pglt_text_edit/schema", "pglt_diagnostics_categories/schema", "pglt_console/schema"] [dev-dependencies] diff --git a/crates/pglt_diagnostics_categories/Cargo.toml b/crates/pglt_diagnostics_categories/Cargo.toml index 0771c05f6..fbc0d7834 100644 --- a/crates/pglt_diagnostics_categories/Cargo.toml +++ b/crates/pglt_diagnostics_categories/Cargo.toml @@ -15,5 +15,9 @@ version = "0.0.0" schemars = { workspace = true, optional = true } serde = { workspace = true, optional = true } +[features] +schema = ["dep:schemars"] +serde = ["dep:serde"] + [build-dependencies] quote = "1.0.14" diff --git a/crates/pglt_diagnostics_categories/build.rs b/crates/pglt_diagnostics_categories/build.rs index 1b2970c6d..9daa5413c 100644 --- a/crates/pglt_diagnostics_categories/build.rs +++ b/crates/pglt_diagnostics_categories/build.rs @@ -64,7 +64,7 @@ pub fn main() -> io::Result<()> { } } - #[cfg(feature = "schemars")] + #[cfg(feature = "schema")] impl schemars::JsonSchema for &'static Category { fn schema_name() -> String { String::from("Category") diff --git a/crates/pglt_diagnostics_macros/Cargo.toml b/crates/pglt_diagnostics_macros/Cargo.toml index 8cc10058c..3f77a86da 100644 --- a/crates/pglt_diagnostics_macros/Cargo.toml +++ b/crates/pglt_diagnostics_macros/Cargo.toml @@ -21,5 +21,3 @@ quote = { workspace = true } syn = { workspace = true } [dev-dependencies] - -[features] diff --git a/crates/pglt_flags/Cargo.toml b/crates/pglt_flags/Cargo.toml index eac82a48a..f3f5e40b6 100644 --- a/crates/pglt_flags/Cargo.toml +++ b/crates/pglt_flags/Cargo.toml @@ -15,5 +15,3 @@ version = "0.0.0" pglt_console = { workspace = true } [dev-dependencies] - -[features] diff --git a/crates/pglt_fs/Cargo.toml b/crates/pglt_fs/Cargo.toml index 11edb8778..8c3b237c5 100644 --- a/crates/pglt_fs/Cargo.toml +++ b/crates/pglt_fs/Cargo.toml @@ -20,14 +20,13 @@ pglt_diagnostics = { workspace = true } rayon = { workspace = true } rustc-hash = { workspace = true } schemars = { workspace = true, optional = true } -serde = { workspace = true } +serde = { workspace = true, optional = true } smallvec = { workspace = true } tracing = { workspace = true } [features] -serde = ["schemars", "pglt_diagnostics/schema"] - -[dev-dependencies] +schema = ["dep:schemars", "pglt_diagnostics/schema"] +serde = ["dep:serde"] [lib] doctest = false diff --git a/crates/pglt_fs/src/path.rs b/crates/pglt_fs/src/path.rs index cc481aea2..37c74f763 100644 --- a/crates/pglt_fs/src/path.rs +++ b/crates/pglt_fs/src/path.rs @@ -17,10 +17,8 @@ use crate::ConfigName; #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Ord, PartialOrd, Hash)] #[repr(u8)] #[bitflags] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] // NOTE: The order of the variants is important, the one on the top has the highest priority pub enum FileKind { /// A configuration file has the highest priority. It's usually `pglt.toml` @@ -85,10 +83,8 @@ impl From for FileKinds { } #[derive(Debug, Clone, Eq, PartialEq, Hash, Default)] -#[cfg_attr( - feature = "serde", - derive(serde::Serialize, serde::Deserialize, schemars::JsonSchema) -)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct PgLTPath { path: PathBuf, /// Determines the kind of the file inside PgLT. Some files are considered as configuration files, others as manifest files, and others as files to handle @@ -201,7 +197,7 @@ impl PgLTPath { } } -#[cfg(feature = "serde")] +#[cfg(feature = "schema")] impl schemars::JsonSchema for FileKinds { fn schema_name() -> String { String::from("FileKind") diff --git a/crates/pglt_lsp/Cargo.toml b/crates/pglt_lsp/Cargo.toml index ddef9f9ac..bb4e4226d 100644 --- a/crates/pglt_lsp/Cargo.toml +++ b/crates/pglt_lsp/Cargo.toml @@ -41,5 +41,3 @@ tower = { version = "0.4.13", features = ["timeout"] } [lib] doctest = false - -[features] diff --git a/crates/pglt_lsp_converters/Cargo.toml b/crates/pglt_lsp_converters/Cargo.toml index c8bace046..9c83bf68a 100644 --- a/crates/pglt_lsp_converters/Cargo.toml +++ b/crates/pglt_lsp_converters/Cargo.toml @@ -21,5 +21,3 @@ tower-lsp = { version = "0.20.0" } [lib] doctest = false - -[features] diff --git a/crates/pglt_markup/Cargo.toml b/crates/pglt_markup/Cargo.toml index 80ef7ed24..f206c8e69 100644 --- a/crates/pglt_markup/Cargo.toml +++ b/crates/pglt_markup/Cargo.toml @@ -20,5 +20,3 @@ quote = "1.0.14" [lib] proc-macro = true - -[features] diff --git a/crates/pglt_text_edit/Cargo.toml b/crates/pglt_text_edit/Cargo.toml index 01bc0bbb7..7dc110efc 100644 --- a/crates/pglt_text_edit/Cargo.toml +++ b/crates/pglt_text_edit/Cargo.toml @@ -12,13 +12,14 @@ version = "0.0.0" [dependencies] -pglt_text_size = { workspace = true, features = ["serde"] } +pglt_text_size = { workspace = true } schemars = { workspace = true, optional = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"], optional = true } similar = { workspace = true, features = ["unicode"] } [features] -schemars = ["dep:schemars"] +schema = ["dep:schemars", "pglt_text_size/schema"] +serde = ["dep:serde", "pglt_text_size/serde"] [dev-dependencies] diff --git a/crates/pglt_text_edit/src/lib.rs b/crates/pglt_text_edit/src/lib.rs index 185bc1ca5..d5612114e 100644 --- a/crates/pglt_text_edit/src/lib.rs +++ b/crates/pglt_text_edit/src/lib.rs @@ -11,26 +11,40 @@ use std::{cmp::Ordering, num::NonZeroU32}; use pglt_text_size::{TextRange, TextSize}; -use serde::{Deserialize, Serialize}; pub use similar::ChangeTag; use similar::{TextDiff, utils::TextDiffRemapper}; -#[derive(Default, Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[derive(Default, Debug, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +#[cfg_attr( + feature = "serde", + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "camelCase") +)] pub struct TextEdit { dictionary: String, ops: Vec, } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +#[cfg_attr( + feature = "serde", + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "camelCase") +)] pub enum CompressedOp { DiffOp(DiffOp), EqualLines { line_count: NonZeroU32 }, } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(rename_all = "snake_case")] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +#[cfg_attr( + feature = "serde", + derive(serde::Serialize, serde::Deserialize), + serde(rename_all = "camelCase") +)] pub enum DiffOp { Equal { range: TextRange }, Insert { range: TextRange }, diff --git a/crates/pglt_text_size/Cargo.toml b/crates/pglt_text_size/Cargo.toml index ec5ce81f4..3e398fdb6 100644 --- a/crates/pglt_text_size/Cargo.toml +++ b/crates/pglt_text_size/Cargo.toml @@ -15,7 +15,7 @@ schemars = { workspace = true, optional = true } serde = { workspace = true, optional = true } [features] -schema = ["dep:schemars", "serde"] +schema = ["dep:schemars"] serde = ["dep:serde"] [dev-dependencies] diff --git a/crates/pglt_text_size/src/lib.rs b/crates/pglt_text_size/src/lib.rs index 92bd36b19..133f6192e 100644 --- a/crates/pglt_text_size/src/lib.rs +++ b/crates/pglt_text_size/src/lib.rs @@ -26,6 +26,9 @@ mod traits; #[cfg(feature = "serde")] mod serde_impls; +#[cfg(feature = "schema")] +mod schemars_impls; + pub use crate::{range::TextRange, size::TextSize, traits::TextLen}; #[cfg(target_pointer_width = "16")] diff --git a/crates/pglt_treesitter_queries/Cargo.toml b/crates/pglt_treesitter_queries/Cargo.toml index ed6e65b98..056b066a8 100644 --- a/crates/pglt_treesitter_queries/Cargo.toml +++ b/crates/pglt_treesitter_queries/Cargo.toml @@ -20,5 +20,3 @@ tree_sitter_sql.workspace = true [lib] doctest = false - -[features] diff --git a/crates/pglt_type_resolver/Cargo.toml b/crates/pglt_type_resolver/Cargo.toml index 929e8a919..d5afdc6da 100644 --- a/crates/pglt_type_resolver/Cargo.toml +++ b/crates/pglt_type_resolver/Cargo.toml @@ -19,5 +19,3 @@ pglt_schema_cache.workspace = true [lib] doctest = false - -[features] diff --git a/crates/pglt_typecheck/Cargo.toml b/crates/pglt_typecheck/Cargo.toml index 19fc7b65b..367939886 100644 --- a/crates/pglt_typecheck/Cargo.toml +++ b/crates/pglt_typecheck/Cargo.toml @@ -28,5 +28,3 @@ pglt_test_utils.workspace = true [lib] doctest = false - -[features] diff --git a/crates/pglt_workspace/Cargo.toml b/crates/pglt_workspace/Cargo.toml index a31d0141b..29e561df6 100644 --- a/crates/pglt_workspace/Cargo.toml +++ b/crates/pglt_workspace/Cargo.toml @@ -29,6 +29,7 @@ pglt_statement_splitter = { workspace = true } pglt_text_size.workspace = true pglt_typecheck = { workspace = true } rustc-hash = { workspace = true } +schemars = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, features = ["raw_value"] } sqlx.workspace = true @@ -38,10 +39,12 @@ tracing = { workspace = true, features = ["attributes", "log"] tree-sitter.workspace = true tree_sitter_sql.workspace = true + +[features] +schema = ["dep:schemars", "pglt_configuration/schema", "pglt_fs/schema"] + [dev-dependencies] tempfile = "3.15.0" [lib] doctest = false - -[features] diff --git a/crates/pglt_workspace/src/workspace.rs b/crates/pglt_workspace/src/workspace.rs index b765ee74e..1bd67cda4 100644 --- a/crates/pglt_workspace/src/workspace.rs +++ b/crates/pglt_workspace/src/workspace.rs @@ -13,6 +13,7 @@ mod client; mod server; #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct OpenFileParams { pub path: PgLTPath, pub content: String, @@ -20,11 +21,13 @@ pub struct OpenFileParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct CloseFileParams { pub path: PgLTPath, } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct ChangeFileParams { pub path: PgLTPath, pub version: i32, @@ -32,6 +35,7 @@ pub struct ChangeFileParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct PullDiagnosticsParams { pub path: PgLTPath, pub categories: RuleCategories, @@ -41,6 +45,7 @@ pub struct PullDiagnosticsParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct CompletionParams { /// The File for which a completion is requested. pub path: PgLTPath, @@ -49,24 +54,15 @@ pub struct CompletionParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct PullDiagnosticsResult { pub diagnostics: Vec, pub errors: usize, pub skipped_diagnostics: u64, } -#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq)] -/// Which fixes should be applied during the analyzing phase -pub enum FixFileMode { - /// Applies [safe](pglt_diagnostics::Applicability::Always) fixes - SafeFixes, - /// Applies [safe](pglt_diagnostics::Applicability::Always) and [unsafe](pglt_diagnostics::Applicability::MaybeIncorrect) fixes - SafeAndUnsafeFixes, - /// Applies suppression comments to existing diagnostics when using `--suppress` - ApplySuppressions, -} - #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct ChangeParams { /// The range of the file that changed. If `None`, the whole file changed. pub range: Option, @@ -80,11 +76,13 @@ impl ChangeParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct IsPathIgnoredParams { pub pglt_path: PgLTPath, } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct UpdateSettingsParams { pub configuration: PartialConfiguration, pub vcs_base_path: Option, @@ -94,11 +92,13 @@ pub struct UpdateSettingsParams { } #[derive(Debug, serde::Serialize, serde::Deserialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct GetFileContentParams { pub path: PgLTPath, } #[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct ServerInfo { /// The name of the server as defined by the server. pub name: String,