Skip to content

Commit 25ea500

Browse files
committed
chore: upgrade utoipa to 5.4.0 with schema fixes
Add explicit schema type annotations for PathBuf and HashMap fields required by utoipa 5.x's stricter type handling.
1 parent bfef743 commit 25ea500

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

codeinput/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ types = []
6868
[dependencies]
6969
# Core dependencies always needed
7070
serde = { workspace = true }
71-
utoipa = { version = "4.2.3", optional = true }
71+
utoipa = { version = "5.4.0", optional = true }
7272

7373
# Full feature dependencies
7474
rayon = { workspace = true, optional = true }

codeinput/src/core/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn normalize_codeowners_pattern(pattern: &str) -> String {
2828
#[derive(Debug, Serialize, Deserialize)]
2929
#[cfg_attr(feature = "utoipa", derive(ToSchema))]
3030
pub struct CodeownersEntry {
31+
#[cfg_attr(feature = "utoipa", schema(value_type = String))]
3132
pub source_file: PathBuf,
3233
pub line_number: usize,
3334
pub pattern: String,
@@ -163,6 +164,7 @@ impl std::fmt::Display for OutputFormat {
163164
#[derive(Debug, Clone, Serialize, Deserialize)]
164165
#[cfg_attr(feature = "utoipa", derive(ToSchema))]
165166
pub struct FileEntry {
167+
#[cfg_attr(feature = "utoipa", schema(value_type = String))]
166168
pub path: PathBuf,
167169
pub owners: Vec<Owner>,
168170
pub tags: Vec<Tag>,
@@ -176,7 +178,9 @@ pub struct CodeownersCache {
176178
pub entries: Vec<CodeownersEntry>,
177179
pub files: Vec<FileEntry>,
178180
// Derived data for lookups
181+
#[cfg_attr(feature = "utoipa", schema(value_type = std::collections::HashMap<Owner, Vec<String>>))]
179182
pub owners_map: std::collections::HashMap<Owner, Vec<PathBuf>>,
183+
#[cfg_attr(feature = "utoipa", schema(value_type = std::collections::HashMap<Tag, Vec<String>>))]
180184
pub tags_map: std::collections::HashMap<Tag, Vec<PathBuf>>,
181185
}
182186

0 commit comments

Comments
 (0)