@@ -47,14 +47,18 @@ public override async Task<IActionResult> GetAsync(CancellationToken cancellatio
4747 }
4848
4949 /// <inheritdoc />
50+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
5051 [ HttpGet ( "{id}" ) ]
52+ [ HttpGet ( "{id};v~{version}" ) ]
5153 [ HttpHead ( "{id}" ) ]
54+ [ HttpHead ( "{id};v~{version}" ) ]
5255 public override async Task < IActionResult > GetAsync ( TId id , CancellationToken cancellationToken )
5356 {
5457 return await base . GetAsync ( id , cancellationToken ) ;
5558 }
5659
5760 /// <inheritdoc />
61+ // No {version} parameter, because it does not occur in rendered links.
5862 [ HttpGet ( "{id}/{relationshipName}" ) ]
5963 [ HttpHead ( "{id}/{relationshipName}" ) ]
6064 public override async Task < IActionResult > GetSecondaryAsync ( TId id , string relationshipName , CancellationToken cancellationToken )
@@ -63,8 +67,11 @@ public override async Task<IActionResult> GetSecondaryAsync(TId id, string relat
6367 }
6468
6569 /// <inheritdoc />
70+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
6671 [ HttpGet ( "{id}/relationships/{relationshipName}" ) ]
72+ [ HttpGet ( "{id};v~{version}/relationships/{relationshipName}" ) ]
6773 [ HttpHead ( "{id}/relationships/{relationshipName}" ) ]
74+ [ HttpHead ( "{id};v~{version}/relationships/{relationshipName}" ) ]
6875 public override async Task < IActionResult > GetRelationshipAsync ( TId id , string relationshipName , CancellationToken cancellationToken )
6976 {
7077 return await base . GetRelationshipAsync ( id , relationshipName , cancellationToken ) ;
@@ -79,6 +86,7 @@ public override async Task<IActionResult> PostAsync([FromBody] TResource resourc
7986
8087 /// <inheritdoc />
8188 [ HttpPost ( "{id}/relationships/{relationshipName}" ) ]
89+ [ HttpPost ( "{id};v~{version}/relationships/{relationshipName}" ) ]
8290 public override async Task < IActionResult > PostRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
8391 CancellationToken cancellationToken )
8492 {
@@ -87,13 +95,15 @@ public override async Task<IActionResult> PostRelationshipAsync(TId id, string r
8795
8896 /// <inheritdoc />
8997 [ HttpPatch ( "{id}" ) ]
98+ [ HttpPatch ( "{id};v~{version}" ) ]
9099 public override async Task < IActionResult > PatchAsync ( TId id , [ FromBody ] TResource resource , CancellationToken cancellationToken )
91100 {
92101 return await base . PatchAsync ( id , resource , cancellationToken ) ;
93102 }
94103
95104 /// <inheritdoc />
96105 [ HttpPatch ( "{id}/relationships/{relationshipName}" ) ]
106+ [ HttpPatch ( "{id};v~{version}/relationships/{relationshipName}" ) ]
97107 public override async Task < IActionResult > PatchRelationshipAsync ( TId id , string relationshipName , [ FromBody ] object ? rightValue ,
98108 CancellationToken cancellationToken )
99109 {
@@ -102,13 +112,15 @@ public override async Task<IActionResult> PatchRelationshipAsync(TId id, string
102112
103113 /// <inheritdoc />
104114 [ HttpDelete ( "{id}" ) ]
115+ [ HttpDelete ( "{id};v~{version}" ) ]
105116 public override async Task < IActionResult > DeleteAsync ( TId id , CancellationToken cancellationToken )
106117 {
107118 return await base . DeleteAsync ( id , cancellationToken ) ;
108119 }
109120
110121 /// <inheritdoc />
111122 [ HttpDelete ( "{id}/relationships/{relationshipName}" ) ]
123+ [ HttpDelete ( "{id};v~{version}/relationships/{relationshipName}" ) ]
112124 public override async Task < IActionResult > DeleteRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
113125 CancellationToken cancellationToken )
114126 {
0 commit comments