Add content negotiation via custom MIME types (#1573)#2189
Merged
jeremydmiller merged 2 commits intomainfrom Feb 15, 2026
Merged
Add content negotiation via custom MIME types (#1573)#2189jeremydmiller merged 2 commits intomainfrom
jeremydmiller merged 2 commits intomainfrom
Conversation
…1573) Allow multiple HTTP endpoints to share the same route and HTTP method, differentiated by Content-Type header using [AcceptsContentType] attribute. Uses ASP.NET Core MatcherPolicy to filter candidates during routing and supports RFC 6839 +json suffix types for JSON deserialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ame route OpenAPI 3.0 doesn't support multiple operations with the same path+method, so configure ResolveConflictingActions for Swashbuckle compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[AcceptsContentType]attribute to allow multiple HTTP endpoints sharing the same route + HTTP method, differentiated byContent-TypeheaderMatcherPolicy(ContentTypeEndpointSelectorPolicy) to filter candidate endpoints during routing based on request Content-Type+jsonsuffix types (e.g.application/vnd.item.v1+json) for JSON deserialization inHttpHandlerMetadata.Accepts()for custom content typesCloses #1573
Test plan
🤖 Generated with Claude Code