@@ -50,14 +50,18 @@ public override async Task<IActionResult> GetAsync(CancellationToken cancellatio
5050 }
5151
5252 /// <inheritdoc />
53+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
5354 [ HttpGet ( "{id}" ) ]
55+ [ HttpGet ( "{id};v~{version}" ) ]
5456 [ HttpHead ( "{id}" ) ]
57+ [ HttpHead ( "{id};v~{version}" ) ]
5558 public override async Task < IActionResult > GetAsync ( TId id , CancellationToken cancellationToken )
5659 {
5760 return await base . GetAsync ( id , cancellationToken ) ;
5861 }
5962
6063 /// <inheritdoc />
64+ // No {version} parameter, because it does not occur in rendered links.
6165 [ HttpGet ( "{id}/{relationshipName}" ) ]
6266 [ HttpHead ( "{id}/{relationshipName}" ) ]
6367 public override async Task < IActionResult > GetSecondaryAsync ( TId id , string relationshipName , CancellationToken cancellationToken )
@@ -66,8 +70,11 @@ public override async Task<IActionResult> GetSecondaryAsync(TId id, string relat
6670 }
6771
6872 /// <inheritdoc />
73+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
6974 [ HttpGet ( "{id}/relationships/{relationshipName}" ) ]
75+ [ HttpGet ( "{id};v~{version}/relationships/{relationshipName}" ) ]
7076 [ HttpHead ( "{id}/relationships/{relationshipName}" ) ]
77+ [ HttpHead ( "{id};v~{version}/relationships/{relationshipName}" ) ]
7178 public override async Task < IActionResult > GetRelationshipAsync ( TId id , string relationshipName , CancellationToken cancellationToken )
7279 {
7380 return await base . GetRelationshipAsync ( id , relationshipName , cancellationToken ) ;
@@ -82,6 +89,7 @@ public override async Task<IActionResult> PostAsync([FromBody] TResource resourc
8289
8390 /// <inheritdoc />
8491 [ HttpPost ( "{id}/relationships/{relationshipName}" ) ]
92+ [ HttpPost ( "{id};v~{version}/relationships/{relationshipName}" ) ]
8593 public override async Task < IActionResult > PostRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
8694 CancellationToken cancellationToken )
8795 {
@@ -90,13 +98,15 @@ public override async Task<IActionResult> PostRelationshipAsync(TId id, string r
9098
9199 /// <inheritdoc />
92100 [ HttpPatch ( "{id}" ) ]
101+ [ HttpPatch ( "{id};v~{version}" ) ]
93102 public override async Task < IActionResult > PatchAsync ( TId id , [ FromBody ] TResource resource , CancellationToken cancellationToken )
94103 {
95104 return await base . PatchAsync ( id , resource , cancellationToken ) ;
96105 }
97106
98107 /// <inheritdoc />
99108 [ HttpPatch ( "{id}/relationships/{relationshipName}" ) ]
109+ [ HttpPatch ( "{id};v~{version}/relationships/{relationshipName}" ) ]
100110 public override async Task < IActionResult > PatchRelationshipAsync ( TId id , string relationshipName , [ FromBody ] object ? rightValue ,
101111 CancellationToken cancellationToken )
102112 {
@@ -105,13 +115,15 @@ public override async Task<IActionResult> PatchRelationshipAsync(TId id, string
105115
106116 /// <inheritdoc />
107117 [ HttpDelete ( "{id}" ) ]
118+ [ HttpDelete ( "{id};v~{version}" ) ]
108119 public override async Task < IActionResult > DeleteAsync ( TId id , CancellationToken cancellationToken )
109120 {
110121 return await base . DeleteAsync ( id , cancellationToken ) ;
111122 }
112123
113124 /// <inheritdoc />
114125 [ HttpDelete ( "{id}/relationships/{relationshipName}" ) ]
126+ [ HttpDelete ( "{id};v~{version}/relationships/{relationshipName}" ) ]
115127 public override async Task < IActionResult > DeleteRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
116128 CancellationToken cancellationToken )
117129 {
0 commit comments