Skip to content

Commit 5b1cb61

Browse files
author
Per Kops
committed
fix: ensure proper reading of ApiOptions in ApiOptionsHelper for AspNetOutputType and SwaggerThemeMode
1 parent b4cde9c commit 5b1cb61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Atc.Rest.ApiGenerator.CLI/ApiOptionsHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ private static void ApplyGeneratorOverrides(
132132
{
133133
if (settings is BaseServerCommandSettings serverCommandSettings)
134134
{
135-
if (serverCommandSettings.AspNetOutputType.IsSet ||
135+
if (serverCommandSettings.AspNetOutputType.IsSet &&
136136
serverCommandSettings.AspNetOutputType.Value != apiOptions.Generator.AspNetOutputType)
137137
{
138138
apiOptions.Generator.AspNetOutputType = serverCommandSettings.AspNetOutputType.Value;
139139
}
140140

141-
if (serverCommandSettings.SwaggerThemeMode.IsSet ||
141+
if (serverCommandSettings.SwaggerThemeMode.IsSet &&
142142
serverCommandSettings.SwaggerThemeMode.Value != apiOptions.Generator.SwaggerThemeMode)
143143
{
144144
apiOptions.Generator.SwaggerThemeMode = serverCommandSettings.SwaggerThemeMode.Value;

0 commit comments

Comments
 (0)