resource-generator: SubParams → nested SingleNestedAttribute/ListNestedAttribute + bump 5.0.73

This commit is contained in:
“Naeel”
2026-07-16 15:06:35 +04:00
parent ef72486bd7
commit 3d22758385
5 changed files with 202 additions and 13 deletions
@@ -27,18 +27,28 @@ func WriteInstanceResource(outDir string, svc types.GenResource) error {
filePath := filepath.Join(outDir, fileName)
tpl, err := template.New("resource").Funcs(template.FuncMap{
"ToCamel": helpers.ToCamel,
"ToSnake": helpers.ToSnake,
"ParamType": helpers.ParamType,
"ParamDefaultExpr": helpers.ParamDefaultExpr,
"ParamFormat": helpers.ParamFormat,
"ParamParse": helpers.ParamParse,
"ParamDescription": helpers.ParamDescription,
"OutputType": helpers.OutputParamType,
"OutputIsMap": helpers.OutputParamIsMap,
"OutputIsList": helpers.OutputParamIsList,
"OutputSensitive": helpers.OutputParamSensitive,
"bt": func() string { return "`" },
"ToCamel": helpers.ToCamel,
"ToSnake": helpers.ToSnake,
"ParamType": helpers.ParamType,
"ParamDefaultExpr": helpers.ParamDefaultExpr,
"ParamFormat": helpers.ParamFormat,
"ParamParse": helpers.ParamParse,
"ParamDescription": helpers.ParamDescription,
"OutputType": helpers.OutputParamType,
"OutputIsMap": helpers.OutputParamIsMap,
"OutputIsList": helpers.OutputParamIsList,
"OutputSensitive": helpers.OutputParamSensitive,
"IsNested": helpers.IsNested,
"IsNestedList": helpers.IsNestedList,
"NestedModelName": helpers.NestedModelName,
"NestedTfType": helpers.NestedTfType,
"NestedSchemaType": helpers.NestedSchemaType,
"NestedSchemaBlock": helpers.NestedSchemaBlock,
"NestedSchemaEnd": helpers.NestedSchemaEnd,
"NestedJSONExpr": helpers.NestedJSONExpr,
"SubSchemaType": helpers.SubSchemaType,
"SubDefaultExpr": helpers.SubDefaultExpr,
"bt": func() string { return "`" },
}).Parse(templates.Instance)
if err != nil {
return err