Skip to content

Commit

Permalink
Derive tag from shortened endspace name
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Sep 26, 2024
1 parent fe1b548 commit bea6b9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler-rs/clients_schema_to_openapi/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ pub fn add_endpoint(
}

// Namespace
// let namespace = match endpoint.name.split_once('.') {
// Some((ns, _)) => ns,
// None => "core",
//};
let namespace = match endpoint.name.split_once('.') {
Some((ns, _)) => ns,
None => &endpoint.name,
};

// Will we produce multiple paths? If true, we will register components for reuse across paths
let is_multipath = endpoint.urls.len() > 1 || endpoint.urls.iter().any(|u| u.methods.len() > 1);
Expand Down Expand Up @@ -196,7 +196,7 @@ pub fn add_endpoint(

// Create the operation, it will be repeated if we have several methods
let operation = openapiv3::Operation {
tags: vec![endpoint.name.splitn(1, '.')],
tags: vec![namespace.to_string()],
summary: sum_desc.summary,
description: sum_desc.description,
external_docs: tac.convert_external_docs(endpoint),
Expand Down
Binary file modified compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm
Binary file not shown.

0 comments on commit bea6b9a

Please sign in to comment.