Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsparser: make tags non-nullable #1729

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tsparser/src/legacymeta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ impl MetaBuilder<'_> {

let tags = ep
.tags
.as_ref()
.unwrap_or(&vec![])
.iter()
.map(|tag| Selector {
r#type: selector::Type::Tag.into(),
Expand Down
4 changes: 2 additions & 2 deletions tsparser/src/parser/resources/apis/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Endpoint {
pub expose: bool,
pub raw: bool,
pub require_auth: bool,
pub tags: Option<Vec<String>>,
pub tags: Vec<String>,

/// Body limit in bytes.
/// None means no limit.
Expand Down Expand Up @@ -375,7 +375,7 @@ pub const ENDPOINT_PARSER: ResourceParser = ResourceParser {
static_assets,
body_limit,
encoding,
tags: cfg.tags,
tags: cfg.tags.unwrap_or_default(),
}));

pass.add_resource(resource.clone());
Expand Down
4 changes: 2 additions & 2 deletions tsparser/src/parser/usageparser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export const Bar = 5;
streaming_request: false,
streaming_response: false,
static_assets: None,
tags: None,
tags: vec![],
}));

let bar_binds = vec![Lrc::new(Bind {
Expand Down Expand Up @@ -654,7 +654,7 @@ export const Bar = 5;
streaming_request: false,
streaming_response: false,
static_assets: None,
tags: None,
tags: vec![],
}));
let bar_binds = vec![Lrc::new(Bind {
kind: BindKind::Create,
Expand Down
Loading