diff --git a/src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs b/src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs index 2adf9395fd..9b1ca7f30e 100644 --- a/src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs +++ b/src/libs/OpenApiGenerator.Cli/Commands/GenerateCommand.cs @@ -139,6 +139,7 @@ private static async Task HandleAsync( .Select(x => Sources.Method(x))) .Concat(data.Authorizations .Select(x => Sources.Authorization(x))) + .Concat([Sources.MainAuthorizationConstructor(data.Authorizations)]) .Concat(data.AnyOfs .SelectMany(x => new [] { Sources.AnyOf(x), Sources.AnyOfJsonConverter(x), Sources.AnyOfJsonConverterFactory(x) })) .Concat([Sources.JsonSerializerContext(data.Converters, data.Types)])