Skip to content

[Question]: Issue with Swashbuckle 10.1.0 – Missing Microsoft.OpenApi.Models references and Basic Auth setup #3757

@andre-lobo

Description

@andre-lobo

What are you wanting to achieve?

Hello,

I'm facing an issue after upgrading to Swashbuckle version 10.1.0 in my .NET 10 application.

It seems that there is no longer a reference to Microsoft.OpenApi.Models, and because of that I can't use OpenApiReference and Reference, which were working before.

My API requires Basic Authentication, and now I'm not sure if I'm configuring it the wrong way or if something changed in this version.

This setup was working fine with Swashbuckle v9, but after upgrading to v10.1.0 the same code no longer compiles due to the missing references.

Is there a new recommended way to configure Basic Authentication and OpenAPI references in Swashbuckle 10.1.0?

Thank you in advance.
André

options.AddSecurityRequirement(new OpenApiSecurityRequirement { { new OpenApiSecurityScheme { Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Basic" } }, Array.Empty<string>() } });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions