Skip to content

MVC: Correct metadata type for formdata enum parameters #61399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ascott18
Copy link
Contributor

@ascott18 ascott18 commented Apr 8, 2025

MVC: Correct metadata type for formdata enum parameters

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

Fixes the type of enum parameters in the API explorer discovered from controller actions to not be forced as string, bringing them in line with other types that have defined conversions to/from string. This in turn fixes an exception in OpenAPI document generation. It also brings this behavior in line with the existing behavior of the same parameters discovered from minimal APIs.

Fixes #61327

@ascott18 ascott18 requested review from wtgodbe, a team, captainsafia and halter73 as code owners April 8, 2025 19:33
@martincostello martincostello added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates and removed area-web-frameworks labels Apr 8, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenAPI: Form data route with enum parameter with default value throws exception
2 participants