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:
@@ -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"),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user