Skip to content

OData Versioned Metadata

Chris Martinez edited this page Jul 29, 2016 · 4 revisions

In order to support API versioning, the default MetadataController is replaced with a VersionedMetadataController implementation. The only difference between the two is that the VersionedMetadataController is API version-neutral.

[ApiVersionNeutral]
public class VersionedMetadataController : MetadataController
{
}

Clients can now build proxies that have an affinity to a specific API version.

  • ~/$metadata
  • ~/$metadata?api-version=1.0
  • ~/$metadata?api-version=2.0
  • ~/$metadata?api-version=3.0

If a client does not specify an API version, the assumed value will be the configured default API version. When a client is ready to adopt a new version of the service, they can update their tooling to point to the appropriate API version of the metadata endpoint and generate a new proxy based on the version-specific EDMX.

Clone this wiki locally