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

Use a simplified namespace value for the OpenAPI tags #2889

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
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