refactor: shared YAML types via tf-tools/lib (yaml-generator + resource-generator)

TOOLS/lib/types.go — canonical ServiceSpec, ParamSpec, OperationSpec, OutputParam.
Both generators use type aliases, one source of truth for YAML contract.
docs-generator stays as-is (will be replaced by LLM-based generator).
This commit is contained in:
“Naeel”
2026-07-06 09:40:59 +04:00
parent 53d03004de
commit b56e634796
8 changed files with 137 additions and 131 deletions
@@ -226,8 +226,8 @@ func ConvertParams(params []types.ParamSpec) []types.Param {
typeName := NormalizeParamType(p.DataType)
defVal := NormalizeDefault(p.Default)
ref := 0
if p.RefSvcId != nil {
ref = *p.RefSvcId
if p.RefSvcID != nil {
ref = *p.RefSvcID
}
out = append(out, types.Param{
ID: p.ID,
@@ -238,7 +238,7 @@ func ConvertParams(params []types.ParamSpec) []types.Param {
RefSvcId: ref,
Descr: strings.TrimSpace(p.Descr),
Man: strings.TrimSpace(p.Man),
Sensitive: p.Sensitive,
Sensitive: p.IsSensitive,
IsJson: strings.EqualFold(strings.TrimSpace(p.DataType), "json"),
})
}