Why doesn’t ProducesAttribute implement IActionConstraint? #63918
-
It seems reasonable to consider |
Beta Was this translation helpful? Give feedback.
Answered by
engineering87
Oct 4, 2025
Replies: 1 comment 2 replies
-
Hello @voroninp, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[Produces]
limits the set of content types an action can return. The output formatter must support at least one of these types, otherwise you’ll get a 406. It doesn’t add new formatters but just constrains negotiation. If the action writes directly to the response,[Produces
] has no effect.