Skip to content

API v3.0

Matched /api/v{major:int}-{minor:int} - typed parameters inside one segment.

major
3 (bound as Int32)
minor
0 (bound as Int32)

Typed complex parts

The literal v must sit at the segment's left edge and the - between the parameters anchors the split, so v2-10 binds major = 2, minor = 10 - both real ints, straight into the typed [Parameter] properties. A non-numeric piece (vX-10) fails the :int constraint and the route doesn't match.

@* /api/v2-10 → major = 2 (int), minor = 10 (int)
   /api/vX-10 → no match *@
<Broute Path="/api/v{major:int}-{minor:int}" Component="@typeof(ApiVersionPage)" />