-
Notifications
You must be signed in to change notification settings - Fork 716
Closed
Description
Summary: If you have an API Version 'Status' with the letter 'v' in it, the following error will be thrown:
{"error":{"code":"ApiVersionUnspecified","message":"An API version is required, but was not specified.","innerError":null}}
Repo: Using .NET Core Basic Sample.
- Upon compiling and running, before any changes, this URL will resolve properly: http://localhost:1237/api/v1.0/HelloWorld
- Modify "HelloWorldController" by changing "ApiVersion" attribute from "1.0" to "1.0-RC" - the updated URL still resolves properly: http://localhost:1237/api/v1.0-RC/HelloWorld
[ApiVersion( "1.0-RC" )]
- Modify "HelloWorldController" by changing "ApiVersion" attribute from "1.0-RC" to "1.0-Inventory" (anything with a 'v' in middle of the name) - this will NOT resolve properly: http://localhost:1237/api/v1.0-Inventory/HelloWorld - you will get the error indicated at top of this Issue.
[ApiVersion( "1.0-Inventory" )]
Though I haven't checked in the code, I am guessing it is using the "v" in analyzing the API Version and trying to do a split operation on it (e.g. as it is often used to mean "version").
Note: I realize this isn't critical as it might be a fringe scenario, but it is a hard one to debug and figure out what is going on without going through source code and it would be nice if there is a way to resolve the issue.