forked from MDCPS/DamageAssessment_Backend
Swagger Documentation Enhancement (273)
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user