Skip to content

Commit df5f74c

Browse files
HavenDVclaude
andcommitted
fix: suppress duplicate CLI action warnings when --generate-cli is not set
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 36d05e3 commit df5f74c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/libs/AutoSDK/Sources/Data.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,14 @@ public static Models.Data Prepare(
246246
})
247247
.ToImmutableArray();
248248

249-
foreach (var group in methods
250-
.GroupBy(x => x.Tag)
251-
.Where(x => !x.AreKeysUnique(y => y.CliAction)))
249+
if (settings.GenerateCli)
252250
{
253-
Console.WriteLine($"Found duplicate CLI action names in '{group.Key.SingularizedName}': {string.Join(", ", group.Select(x => x.CliAction))}");
251+
foreach (var group in methods
252+
.GroupBy(x => x.Tag)
253+
.Where(x => !x.AreKeysUnique(y => y.CliAction)))
254+
{
255+
Console.WriteLine($"Found duplicate CLI action names in '{group.Key.SingularizedName}': {string.Join(", ", group.Select(x => x.CliAction))}");
256+
}
254257
}
255258

256259
var authorizations = openApiDocument.Security!

0 commit comments

Comments
 (0)