Skip to content

Commit a3b903c

Browse files
lcawlAnaethelion
andauthored
Update compiler-rs/clients_schema_to_openapi/src/paths.rs
Co-authored-by: Laurent Saint-Félix <[email protected]>
1 parent b5e6fe8 commit a3b903c

File tree

1 file changed

+5
-1
lines changed
  • compiler-rs/clients_schema_to_openapi/src

1 file changed

+5
-1
lines changed

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ pub fn add_endpoint(
196196

197197
// Create the operation, it will be repeated if we have several methods
198198
let operation = openapiv3::Operation {
199-
tags: if endpoint.doc_tag.is_some() {vec![endpoint.doc_tag.clone().expect("TODO: panic message")]} else {vec![namespace.to_string()]},
199+
tags: if let Some(doc_tag) = &endpoint.doc_tag {
200+
vec![doc_tag.clone()]
201+
} else {
202+
vec![namespace.to_string()]
203+
},
200204
summary: sum_desc.summary,
201205
description: sum_desc.description,
202206
// external_docs: tac.convert_external_docs(endpoint),

0 commit comments

Comments
 (0)