Skip to content

Commit

Permalink
Use a simplified namespace value for the OpenAPI tags (#2889)
Browse files Browse the repository at this point in the history
(cherry picked from commit bf8b9d8)
  • Loading branch information
lcawl authored and github-actions[bot] committed Sep 26, 2024
1 parent 515dea5 commit bd072fd
Show file tree
Hide file tree
Showing 4 changed files with 938 additions and 938 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.clone()],
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.
Loading

0 comments on commit bd072fd

Please sign in to comment.