Skip to content

Commit

Permalink
Change operation names in API documentation (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand authored Feb 14, 2022
1 parent 004a85b commit 719b5de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public DeviceModelCommandsController(
/// <param name="id">The model identifier.</param>
/// <param name="command">The command.</param>
/// <returns>The action result.</returns>
[HttpPost]
[HttpPost(Name = "POST Device model command")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> Post(string id, DeviceModelCommand command)
Expand Down Expand Up @@ -101,7 +101,7 @@ await this.tableClientFactory
/// <param name="commandId">The command identifier.</param>
/// <returns>The action result.</returns>
/// <response code="204">If the device model's command is deleted.</response>
[HttpDelete("{commandId}")]
[HttpDelete("{commandId}", Name = "DELETE Device model command")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public async Task<IActionResult> Delete(string modelId, string commandId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public DeviceModelsController(
/// Gets the device models.
/// </summary>
/// <returns>The list of device models.</returns>
[HttpGet]
[HttpGet(Name = "GET Device models")]
[ProducesResponseType(StatusCodes.Status200OK)]
public IEnumerable<DeviceModel> Get()
{
Expand All @@ -109,7 +109,7 @@ public IEnumerable<DeviceModel> Get()
/// </summary>
/// <param name="id">The model identifier.</param>
/// <returns>The corresponding model.</returns>
[HttpGet("{id}")]
[HttpGet("{id}", Name = "GET Device model")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public IActionResult Get(string id)
Expand Down Expand Up @@ -140,7 +140,7 @@ public IActionResult Get(string id)
/// </summary>
/// <param name="id">The model identifier.</param>
/// <returns>The avatar.</returns>
[HttpGet("{id}/avatar")]
[HttpGet("{id}/avatar", Name = "GET Device model avatar")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public IActionResult GetAvatar(string id)
Expand Down Expand Up @@ -172,7 +172,7 @@ public IActionResult GetAvatar(string id)
/// <param name="id">The model identifier.</param>
/// <param name="file">The file.</param>
/// <returns>The avatar.</returns>
[HttpPost("{id}/avatar")]
[HttpPost("{id}/avatar", Name = "POST Device model avatar")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> ChangeAvatar(string id, IFormFile file)
Expand Down Expand Up @@ -202,7 +202,7 @@ public async Task<IActionResult> ChangeAvatar(string id, IFormFile file)
/// Deletes the avatar.
/// </summary>
/// <param name="id">The model identifier.</param>
[HttpDelete("{id}/avatar")]
[HttpDelete("{id}/avatar", Name = "DELETE Device model avatar")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> DeleteAvatar(string id)
Expand Down Expand Up @@ -235,7 +235,7 @@ public async Task<IActionResult> DeleteAvatar(string id)
/// </summary>
/// <param name="deviceModel">The device model.</param>
/// <returns>The action result.</returns>
[HttpPost]
[HttpPost(Name = "POST Device model")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Post(DeviceModel deviceModel)
Expand Down Expand Up @@ -277,7 +277,7 @@ public async Task<IActionResult> Post(DeviceModel deviceModel)
/// </summary>
/// <param name="deviceModel">The device model.</param>
/// <returns>The action result.</returns>
[HttpPut]
[HttpPut(Name = "PUT Device model")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
Expand Down Expand Up @@ -318,7 +318,7 @@ public async Task<IActionResult> Put(DeviceModel deviceModel)
/// </summary>
/// <param name="id">The device model identifier.</param>
/// <returns>The action result.</returns>
[HttpDelete("{id}")]
[HttpDelete("{id}", Name = "DELETE Device model")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
Expand Down

0 comments on commit 719b5de

Please sign in to comment.