-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Closed
Copy link
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Produces<string>() defaults to "application/json" like it does for all calls that don't explicitely specify the Content-Type.
aspnetcore/src/Http/Routing/src/Builder/OpenApiRouteHandlerBuilderExtensions.cs
Lines 77 to 80 in 3ca6b33
| if (responseType is Type && string.IsNullOrEmpty(contentType)) | |
| { | |
| contentType = "application/json"; | |
| } |
This is unintuitive behavior.
Expected Behavior
string should be special-cased to default to a "text/plain" content-type instead.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
See #43961 (comment)
martincostello
Metadata
Metadata
Assignees
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels