C#C
C#3y ago
julian

Error on activation

Class I'm trying to activate
public class SwaggerGenConfigureOptions : IConfigureOptions<SwaggerGenOptions>
{
    private readonly IApiVersionDescriptionProvider _provider;

    public SwaggerGenConfigureOptions(IApiVersionDescriptionProvider provider) => _provider = provider;

    public void Configure(SwaggerGenOptions options)
    {
        foreach (var description in _provider.ApiVersionDescriptions)
        {
            options.SwaggerDoc(description.GroupName, new OpenApiInfo()
            {
                Title = "XXXXXXX Domain API",
                Version = description.ApiVersion.ToString(),
                Description = "API to read and change data in the Absence Domain" + (description.IsDeprecated ? " (deprecated)" : ""),
            });
        }
    }
}


Activation:
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, SwaggerGenConfigureOptions>();


Error:
Error msg was too long to be posted here.
https://pastebin.com/x0NsubVB
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?