Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

Plan: Replace Swashbuckle with Microsoft.AspNetCore.OpenApi

  • Understand the current Swashbuckle implementation and usage
  • Update Directory.Packages.props to use Swashbuckle 10.1 and Microsoft.AspNetCore.OpenApi 10.0.2
  • Update TeachingRecordSystem.Api.csproj to include Microsoft.AspNetCore.OpenApi
  • Update namespace imports from Microsoft.OpenApi.Models to Microsoft.OpenApi
  • Update ISchemaFilter to use IOpenApiSchema interface
  • IN PROGRESS: Update remaining OpenApi infrastructure to use new API
    • Microsoft.OpenApi 2.x (used by Swashbuckle 10.x) has breaking API changes:
      • OpenApiString → primitive value handling changed (now uses JsonNode)
      • OpenApiReference → now OpenApiReferenceId with different structure
      • OpenApiSchema.ReferenceOpenApiSchema.Ref with OpenApiReferenceId
      • OpenApiSchema.Type changed from string to JsonSchemaType enum
      • Enum handling changed from IOpenApiAny to IOpenApiPrimitive
    • Need to update:
      • MinorVersionHeaderDocumentFilter
      • AddSecuritySchemeOperationFilter
      • ContentTypesOperationFilter
      • RemoveExcludedEnumOptionsSchemaFilter
  • Build and test the changes
  • Run code review and security checks

Note: This migration is more complex than anticipated due to significant breaking changes in Microsoft.OpenApi 2.x API. Swashbuckle 10.x is compatible with the new API but requires updating all filter/resolver code.

Original prompt

Replace Swashbuckle with Microsoft.AspNetCore.OpenApi


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…tibilities

Co-authored-by: gunndabad <2041280+gunndabad@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants