Summary
Upgrade Microsoft.OpenApi from 1.6.x to 2.x+ and Swashbuckle.AspNetCore from 8.1.1 to 10.x.
Why
Swashbuckle 10.x pulls in Microsoft.OpenApi 2.4.1 as a transitive dependency. OpenApi v2 is a complete rewrite — types like OpenApiDocument, OpenApiSchema, OperationType, IOpenApiExtension were moved or removed from their v1 namespaces. At runtime, .NET resolves to the highest version (v2 from Swashbuckle), causing TypeLoadException for every OpenApi v1 type the codebase uses.
Currently both packages are pinned to their old versions to avoid this conflict.
Scope
8 files across DevProxy.Abstractions and DevProxy.Plugins use OpenApi v1 types (~89 call sites):
DevProxy.Plugins/Generation/OpenApiSpecGeneratorPlugin.cs (heaviest user — uses Microsoft.OpenApi.Any, .Extensions, .Interfaces, .Writers)
DevProxy.Plugins/Reporting/MinimalPermissionsPlugin.cs
DevProxy.Plugins/Reporting/MinimalPermissionsGuidancePlugin.cs
DevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPlugin.cs
DevProxy.Plugins/Generation/ApiCenterOnboardingPlugin.cs
DevProxy.Plugins/Models/ApiCenterModels.cs
DevProxy.Plugins/Extensions/ApiCenterExtensions.cs
DevProxy.Abstractions/Data/MSGraphDb.cs
Key breaking changes in OpenApi v2
Microsoft.OpenApi.Any namespace removed
Microsoft.OpenApi.Extensions namespace removed/reorganized
Microsoft.OpenApi.Interfaces removed (IOpenApiExtension gone)
Microsoft.OpenApi.Writers removed/replaced
OpenApiDocument, OpenApiSchema, OpenApiPathItem, OperationType moved or redesigned
OpenApiStreamReader replaced with new reading API
Summary
Upgrade
Microsoft.OpenApifrom 1.6.x to 2.x+ andSwashbuckle.AspNetCorefrom 8.1.1 to 10.x.Why
Swashbuckle 10.x pulls in
Microsoft.OpenApi2.4.1 as a transitive dependency. OpenApi v2 is a complete rewrite — types likeOpenApiDocument,OpenApiSchema,OperationType,IOpenApiExtensionwere moved or removed from their v1 namespaces. At runtime, .NET resolves to the highest version (v2 from Swashbuckle), causingTypeLoadExceptionfor every OpenApi v1 type the codebase uses.Currently both packages are pinned to their old versions to avoid this conflict.
Scope
8 files across
DevProxy.AbstractionsandDevProxy.Pluginsuse OpenApi v1 types (~89 call sites):DevProxy.Plugins/Generation/OpenApiSpecGeneratorPlugin.cs(heaviest user — usesMicrosoft.OpenApi.Any,.Extensions,.Interfaces,.Writers)DevProxy.Plugins/Reporting/MinimalPermissionsPlugin.csDevProxy.Plugins/Reporting/MinimalPermissionsGuidancePlugin.csDevProxy.Plugins/Reporting/ApiCenterMinimalPermissionsPlugin.csDevProxy.Plugins/Generation/ApiCenterOnboardingPlugin.csDevProxy.Plugins/Models/ApiCenterModels.csDevProxy.Plugins/Extensions/ApiCenterExtensions.csDevProxy.Abstractions/Data/MSGraphDb.csKey breaking changes in OpenApi v2
Microsoft.OpenApi.Anynamespace removedMicrosoft.OpenApi.Extensionsnamespace removed/reorganizedMicrosoft.OpenApi.Interfacesremoved (IOpenApiExtensiongone)Microsoft.OpenApi.Writersremoved/replacedOpenApiDocument,OpenApiSchema,OpenApiPathItem,OperationTypemoved or redesignedOpenApiStreamReaderreplaced with new reading API