Skip to content

Commit

Permalink
fix: swagger parameter name match case from FromRoute attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Dec 12, 2023
1 parent 828b40d commit 305676c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions App/Modules/Schedules/API/V1/ScheduleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task<ActionResult<LatestScheduleRes>> Latest()
new EntityNotFound("There has been no schedules", typeof(Schedule), "latest"));
}

[HttpGet("range/{from}/{to}")]
[HttpGet("range/{From}/{To}")]
public async Task<ActionResult<IEnumerable<SchedulePrincipalRes>>> Range([FromRoute] ScheduleRangeReq req)
{
var result = await scheduleRangeReqValidator
Expand All @@ -45,7 +45,7 @@ public async Task<ActionResult<IEnumerable<SchedulePrincipalRes>>> Range([FromRo
return this.ReturnResult(result);
}

[HttpGet("{date}")]
[HttpGet("{Date}")]
public async Task<ActionResult<SchedulePrincipalRes>> Get([FromRoute] ScheduleDateReq req)
{
var result = await scheduleDateReqValidator
Expand All @@ -55,7 +55,7 @@ public async Task<ActionResult<SchedulePrincipalRes>> Get([FromRoute] ScheduleDa
return this.ReturnResult(result);
}

[Authorize(Policy = AuthPolicies.AdminOrScheduleSyncer), HttpPut("{date}")]
[Authorize(Policy = AuthPolicies.AdminOrScheduleSyncer), HttpPut("{Date}")]
public async Task<ActionResult<SchedulePrincipalRes>> Update([FromRoute] ScheduleDateReq dateReq,
[FromBody] ScheduleRecordReq record)
{
Expand All @@ -76,7 +76,7 @@ public async Task<ActionResult> BulkUpdate([FromBody] ScheduleBulkUpdateReq sche
return this.ReturnUnitResult(result);
}

[Authorize(Policy = AuthPolicies.OnlyAdmin), HttpDelete("{date}")]
[Authorize(Policy = AuthPolicies.OnlyAdmin), HttpDelete("{Date}")]
public async Task<ActionResult> Delete([FromRoute] ScheduleDateReq req)
{
var result = await scheduleDateReqValidator
Expand Down

0 comments on commit 305676c

Please sign in to comment.