From f0dacb02801b8ef1763acba30bbed3c6d52772c7 Mon Sep 17 00:00:00 2001 From: Andrzej Ressel Date: Sat, 21 Dec 2024 21:11:02 +0100 Subject: [PATCH] Namespaces --- .../src/output/rust/source_code_types_mod.rs | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/pulumi_wasm_generator_lib/src/output/rust/source_code_types_mod.rs b/pulumi_wasm_generator_lib/src/output/rust/source_code_types_mod.rs index 61d44eeb..4a72fd98 100644 --- a/pulumi_wasm_generator_lib/src/output/rust/source_code_types_mod.rs +++ b/pulumi_wasm_generator_lib/src/output/rust/source_code_types_mod.rs @@ -3,71 +3,6 @@ use convert_case::{Case, Casing}; use rinja::Template; use std::collections::BTreeMap; -// static TEMPLATE: &str = include_str!("types_mod.rs.handlebars"); - -// #[derive(Template)] // this will generate the code... -// #[template(path = "hello.html")] // using the template in this path, relative -// // to the `templates` dir in the crate root -// struct HelloTemplate<'a> { // the name of the struct can be anything -// name: &'a str, // the field name should match the variable name -// // in your template -// } -// -// #[derive(Serialize)] -// struct RefType { -// file_name: String, -// } -// -// #[derive(Serialize)] -// struct AliasType { -// name: String, -// type_: String, -// } -// -// #[derive(Serialize)] -// struct Package { -// types: Vec, -// } -// -// fn convert_model(package: &crate::model::Package) -> Package { -// let mut real_types = Vec::new(); -// -// package -// .types -// .iter() -// .for_each(|(element_id, resource)| match resource { -// GlobalType::Object(_, _) => { -// let ref_type = RefType { -// file_name: element_id.get_rust_struct_name().to_case(Case::Snake), -// }; -// real_types.push(ref_type); -// } -// GlobalType::StringEnum(_, _) -// | GlobalType::IntegerEnum(_, _) -// | GlobalType::NumberEnum(_, _) => { -// let ref_type = RefType { -// file_name: element_id.get_rust_struct_name().to_case(Case::Snake), -// }; -// real_types.push(ref_type); -// } -// }); -// -// Package { types: real_types } -// } -// -// pub(crate) fn generate_source_code(package: &crate::model::Package) -> String { -// let package = convert_model(package); -// -// let content = { -// let handlebars = Handlebars::new(); -// handlebars -// .render_template(TEMPLATE, &json!({"package": &package})) -// .unwrap() -// }; -// -// content -// } - #[derive(Template)] #[template(path = "types_mod.rs.jinja")] struct TemplateModel {