Skip to content

Fix Swashbuckle 6.9 IFormFile schema generation error in ExportController#505

Merged
Chris0Jeky merged 1 commit intomainfrom
fix/swashbuckle-formfile
Mar 29, 2026
Merged

Fix Swashbuckle 6.9 IFormFile schema generation error in ExportController#505
Chris0Jeky merged 1 commit intomainfrom
fix/swashbuckle-formfile

Conversation

@Chris0Jeky
Copy link
Copy Markdown
Owner

Summary

Swashbuckle.AspNetCore 6.9.0 introduced stricter validation: actions using [FromForm] with IFormFile must explicitly declare [Consumes("multipart/form-data")], otherwise OpenAPI generation throws a SwaggerGeneratorException at runtime when fetching swagger.json.

Root cause: ExportController.ImportDatabase uses [FromForm] IFormFile? file without the [Consumes] attribute.
Fix: Add [Consumes("multipart/form-data")] to the action.

Affected Dependabot PR

Test plan

Swashbuckle 6.9.0 requires [Consumes("multipart/form-data")] on actions
that use [FromForm] with IFormFile. Add it to ExportController.ImportDatabase
to unblock PR #489 (dotnet-minor-patch group with Swashbuckle 6.5→6.9).
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Chris0Jeky Chris0Jeky merged commit f374c6d into main Mar 29, 2026
18 checks passed
@github-project-automation github-project-automation bot moved this from Pending to Done in Taskdeck Execution Mar 29, 2026
@Chris0Jeky Chris0Jeky deleted the fix/swashbuckle-formfile branch March 29, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant