Skip to content

Commit

Permalink
Update compiler-rs/clients_schema_to_openapi/src/paths.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Laurent Saint-Félix <[email protected]>
  • Loading branch information
lcawl and Anaethelion authored Oct 3, 2024
1 parent b5e6fe8 commit a3b903c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler-rs/clients_schema_to_openapi/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ pub fn add_endpoint(

// Create the operation, it will be repeated if we have several methods
let operation = openapiv3::Operation {
tags: if endpoint.doc_tag.is_some() {vec![endpoint.doc_tag.clone().expect("TODO: panic message")]} else {vec![namespace.to_string()]},
tags: if let Some(doc_tag) = &endpoint.doc_tag {
vec![doc_tag.clone()]
} else {
vec![namespace.to_string()]
},
summary: sum_desc.summary,
description: sum_desc.description,
// external_docs: tac.convert_external_docs(endpoint),
Expand Down

0 comments on commit a3b903c

Please sign in to comment.