dotnet / aspnet-api-versioning

Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
MIT License
3.06k stars 703 forks source link

Documentation: Default value for ApiVersionReader is misleading #1098

Open YC opened 4 months ago

YC commented 4 months ago

Is there an existing issue for this?

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