@@ -50,14 +50,18 @@ public override async Task<IActionResult> GetAsync(CancellationToken cancellatio
50
50
}
51
51
52
52
/// <inheritdoc />
53
+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
53
54
[ HttpGet ( "{id}" ) ]
55
+ [ HttpGet ( "{id};v~{version}" ) ]
54
56
[ HttpHead ( "{id}" ) ]
57
+ [ HttpHead ( "{id};v~{version}" ) ]
55
58
public override async Task < IActionResult > GetAsync ( TId id , CancellationToken cancellationToken )
56
59
{
57
60
return await base . GetAsync ( id , cancellationToken ) ;
58
61
}
59
62
60
63
/// <inheritdoc />
64
+ // No {version} parameter, because it does not occur in rendered links.
61
65
[ HttpGet ( "{id}/{relationshipName}" ) ]
62
66
[ HttpHead ( "{id}/{relationshipName}" ) ]
63
67
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
66
70
}
67
71
68
72
/// <inheritdoc />
73
+ // The {version} parameter is allowed, but ignored. It occurs in rendered links, because POST/PATCH/DELETE use it.
69
74
[ HttpGet ( "{id}/relationships/{relationshipName}" ) ]
75
+ [ HttpGet ( "{id};v~{version}/relationships/{relationshipName}" ) ]
70
76
[ HttpHead ( "{id}/relationships/{relationshipName}" ) ]
77
+ [ HttpHead ( "{id};v~{version}/relationships/{relationshipName}" ) ]
71
78
public override async Task < IActionResult > GetRelationshipAsync ( TId id , string relationshipName , CancellationToken cancellationToken )
72
79
{
73
80
return await base . GetRelationshipAsync ( id , relationshipName , cancellationToken ) ;
@@ -82,6 +89,7 @@ public override async Task<IActionResult> PostAsync([FromBody] TResource resourc
82
89
83
90
/// <inheritdoc />
84
91
[ HttpPost ( "{id}/relationships/{relationshipName}" ) ]
92
+ [ HttpPost ( "{id};v~{version}/relationships/{relationshipName}" ) ]
85
93
public override async Task < IActionResult > PostRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
86
94
CancellationToken cancellationToken )
87
95
{
@@ -90,13 +98,15 @@ public override async Task<IActionResult> PostRelationshipAsync(TId id, string r
90
98
91
99
/// <inheritdoc />
92
100
[ HttpPatch ( "{id}" ) ]
101
+ [ HttpPatch ( "{id};v~{version}" ) ]
93
102
public override async Task < IActionResult > PatchAsync ( TId id , [ FromBody ] TResource resource , CancellationToken cancellationToken )
94
103
{
95
104
return await base . PatchAsync ( id , resource , cancellationToken ) ;
96
105
}
97
106
98
107
/// <inheritdoc />
99
108
[ HttpPatch ( "{id}/relationships/{relationshipName}" ) ]
109
+ [ HttpPatch ( "{id};v~{version}/relationships/{relationshipName}" ) ]
100
110
public override async Task < IActionResult > PatchRelationshipAsync ( TId id , string relationshipName , [ FromBody ] object ? rightValue ,
101
111
CancellationToken cancellationToken )
102
112
{
@@ -105,13 +115,15 @@ public override async Task<IActionResult> PatchRelationshipAsync(TId id, string
105
115
106
116
/// <inheritdoc />
107
117
[ HttpDelete ( "{id}" ) ]
118
+ [ HttpDelete ( "{id};v~{version}" ) ]
108
119
public override async Task < IActionResult > DeleteAsync ( TId id , CancellationToken cancellationToken )
109
120
{
110
121
return await base . DeleteAsync ( id , cancellationToken ) ;
111
122
}
112
123
113
124
/// <inheritdoc />
114
125
[ HttpDelete ( "{id}/relationships/{relationshipName}" ) ]
126
+ [ HttpDelete ( "{id};v~{version}/relationships/{relationshipName}" ) ]
115
127
public override async Task < IActionResult > DeleteRelationshipAsync ( TId id , string relationshipName , [ FromBody ] ISet < IIdentifiable > rightResourceIds ,
116
128
CancellationToken cancellationToken )
117
129
{
0 commit comments