-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
MediaTypeApiVersionReaderBuilder implements IApiVersionParameterSource which is used to describe where an API version parameter can appear. The current implementation does not report its source correctly if there are no parameter names defined.
Expected Behavior
MediaTypeApiVersionReaderBuilder.AddParameters should indicate that it versions by media type, even when there are no parameters. This would have parity with UrlSegmentApiVersionReader, which also does not have parameters.
Steps To Reproduce
var reader = new MediaTypeApiVersionReaderBuilder().Build();
Assert.True(reader.VersionsByMediaType(), "Reader does not version by media type");This fails when it should succeed.
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response