aspnet-api-versioning icon indicating copy to clipboard operation
aspnet-api-versioning copied to clipboard

Documentation: Default value for ApiVersionReader is misleading

Open YC opened this issue 1 year ago • 0 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

According to the documentation comment:

The default value is the QueryStringApiVersionReader, which only reads the API version from the "api-version" query string parameter.

Instead, the default is Combine( new QueryStringApiVersionReader(), new UrlSegmentApiVersionReader() ).

https://github.com/dotnet/aspnet-api-versioning/blob/v8.1.0/src/Common/src/Common/ApiVersioningOptions.cs#L65-L69 https://github.com/dotnet/aspnet-api-versioning/blob/v8.1.0/src/Common/src/Common/ApiVersionReader.cs#L25

Expected Behavior

The documentation should be updated to reflect that the default is a combination of both.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

YC avatar Jun 24 '24 07:06 YC