From 791adbb54d12d39cb761b2dd1acabd15c0e0a883 Mon Sep 17 00:00:00 2001 From: Stavros Date: Sat, 11 Jul 2026 17:18:23 +0300 Subject: [PATCH] fix: remove omitempty suffix from docs gen --- gen/docs/gen_env.go | 2 ++ gen/docs/gen_md.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gen/docs/gen_env.go b/gen/docs/gen_env.go index 041b43cf..2f44611e 100644 --- a/gen/docs/gen_env.go +++ b/gen/docs/gen_env.go @@ -51,6 +51,8 @@ func buildEnvEntry(child reflect.StructField, childValue reflect.Value, parentPa return } + tag = strings.TrimSuffix(tag, ",omitempty") + value := childValue.Interface() entry := EnvEntry{ diff --git a/gen/docs/gen_md.go b/gen/docs/gen_md.go index a5abf587..ade916d4 100644 --- a/gen/docs/gen_md.go +++ b/gen/docs/gen_md.go @@ -52,6 +52,8 @@ func buildMdEntry(child reflect.StructField, childValue reflect.Value, parentPat return } + tag = strings.TrimSuffix(tag, ",omitempty") + value := childValue.Interface() entry := MarkdownEntry{ @@ -88,6 +90,8 @@ func buildMdMapEntry(child reflect.StructField, parentPath string, entries *[]Ma return } + tag = strings.TrimSuffix(tag, ",omitempty") + mapPath := parentPath + tag + ".[name]." valueType := fieldType.Elem()