Swagger Documentation Enhancement (273)

This commit is contained in:
Santhosh S
2023-08-24 21:25:38 -04:00
parent 9345ee2ca5
commit e56ffae1a4
22 changed files with 288 additions and 49 deletions

View File

@ -19,7 +19,10 @@ namespace DamageAssesment.Api.Attachments.Controllers
this.AttachmentProvider = AttachmentsProvider;
this.UploadService = uploadService;
}
//get all Attachments
/// <summary>
/// Get all attachments.
/// </summary>
[HttpGet("Attachments")]
public async Task<ActionResult> GetAttachmentsAsync()
{
@ -32,7 +35,9 @@ namespace DamageAssesment.Api.Attachments.Controllers
return NoContent();
}
//get all Attachment by Id
/// <summary>
/// Get all attachments by attachmentId.
/// </summary>
[HttpGet("Attachments/{id}")]
public async Task<ActionResult> GetAttachmentbyIdAsync(int id)
{
@ -73,7 +78,10 @@ namespace DamageAssesment.Api.Attachments.Controllers
// }
//}
//Save new Attachment
/// <summary>
/// Save new Attachment(s)
/// </summary>
[HttpPost("Attachments"), DisableRequestSizeLimit]
public async Task<IActionResult> UploadAttachmentAsync(AttachmentInfo attachmentInfo)
{
@ -97,8 +105,10 @@ namespace DamageAssesment.Api.Attachments.Controllers
return BadRequest($"Internal server error: {ex}");
}
}
/// <summary>
/// Modify an new attachment.
/// </summary>
//Save new Attachment
[HttpPut("Attachments"), DisableRequestSizeLimit]
public async Task<IActionResult> UpdateAttachmentAsync(AttachmentInfo attachmentInfo)
{
@ -126,7 +136,9 @@ namespace DamageAssesment.Api.Attachments.Controllers
return BadRequest($"Internal server error: {ex}");
}
}
//delete existing Attachment
/// <summary>
/// Delete an existing attachment.
/// </summary>
[HttpDelete("Delete")]
public async Task<IActionResult> DeleteAttachment(int Id)
{