Skip to content

Support Major-Only Version Scheme #11

Closed
@commonsensesoftware

Description

@commonsensesoftware

According to the Microsoft REST API guidelines for versioning, a major-only version scheme should be supported. If a client only provides the API version as "1", then the minor version should implicitly be inferred as ".0" or zero. In other words, the API versions 1 and 1.0 should be equivalent. The equality and comparison methods for the ApiVersion class currently treat them as being different.

Examples

GET /foo?api-version=1 HTTP/1.1
host: localhost
GET /foo?api-version=1.0 HTTP/1.1
host: localhost
GET /foo HTTP/1.1
host: localhost
api-version: 1
GET /foo HTTP/1.1
host: localhost
api-version: 1.0

All of these requests should be treated as semantically equivalent requests.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions