Skip to content

Commit 32574d9

Browse files
(GH-538) Use TagList in ExtensionManifest
Prior to this change, the extension manifest struct defined the `tags` field as `Option<Vec<String>>`. This change updates the field to use the `TagList` newtype, which wraps `HashSet<Tag>` to provide better semantics and JSON Schema for the type. The `tags` field isn't directly accessed in any existing code.
1 parent 6888637 commit 32574d9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/dsc-lib/src/extensions/extension_manifest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::collections::HashMap;
1111
use crate::dscerror::DscError;
1212
use crate::extensions::{discover::DiscoverMethod, import::ImportMethod, secret::SecretMethod};
1313
use crate::schemas::dsc_repo::DscRepoSchema;
14-
use crate::types::FullyQualifiedTypeName;
14+
use crate::types::{FullyQualifiedTypeName, TagList};
1515

1616
#[derive(Debug, Default, Clone, PartialEq, Deserialize, Serialize, JsonSchema, DscRepoSchema)]
1717
#[serde(deny_unknown_fields)]
@@ -41,7 +41,8 @@ pub struct ExtensionManifest {
4141
/// The description of the extension.
4242
pub description: Option<String>,
4343
/// Tags for the extension.
44-
pub tags: Option<Vec<String>>,
44+
#[serde(default)]
45+
pub tags: TagList,
4546
/// Details how to call the Discover method of the extension.
4647
pub discover: Option<DiscoverMethod>,
4748
/// Details how to call the Import method of the extension.

0 commit comments

Comments
 (0)