Skip to content

Commit 116f4c3

Browse files
georgewallacelcawl
andcommitted
update logic for x-metatags to use the standard term used by webteam … (#4972)
* update logic for x-metatags to use the standard term used by webteam for other docs * Generate output * Update product-meta.json updating the friendly names as bump logic does not convert product ID to product Name * Updating main product in product_str to be friendly name --------- Co-authored-by: lcawl <[email protected]>
1 parent fed383a commit 116f4c3

File tree

5 files changed

+7214
-1209
lines changed

5 files changed

+7214
-1209
lines changed

compiler-rs/clients_schema_to_openapi/src/lib.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use indexmap::IndexMap;
2525

2626
use clients_schema::{Availabilities, Availability, Flavor, IndexedModel, Stability, Visibility};
2727
use openapiv3::{Components, OpenAPI};
28-
use serde_json::Value;
28+
use serde_json::{Map,Value};
2929
use clients_schema::transform::ExpandConfig;
3030
use crate::components::TypesAndComponents;
3131

@@ -190,9 +190,14 @@ pub fn product_meta_as_extensions(namespace: &str, product_meta: &IndexMap<Strin
190190
if let Some(meta) = product_meta.get(namespace) {
191191
additional_namespace = format!(", {meta}");
192192
}
193-
194-
let product_str = format!("elasticsearch{additional_namespace}");
195-
result.insert("x-product-feature".to_string(), Value::String(product_str));
193+
194+
let product_str = format!("Elasticsearch{additional_namespace}");
195+
let mut product_feature_list: Vec<Value> = Vec::new();
196+
let mut product_feature: Map<String, Value> = Map::new();
197+
product_feature.insert("name".to_string(),Value::String("product_name".to_string()));
198+
product_feature.insert("content".to_string(),Value::String(product_str));
199+
product_feature_list.push(Value::Object(product_feature));
200+
result.insert("x-metaTags".to_string(), Value::Array(product_feature_list));
196201
result
197202
}
198203

Binary file not shown.

0 commit comments

Comments
 (0)