Swagger is working fine for add and delete operation but when i have add one more mathods as UpdateProperty in propertyContoller than i got error "Failed to load API definition".
Where i did the mistake ?
[HttpPut]
[Route("addproperties")]
[ProducesResponseType((int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.BadRequest)]
public async Task<IActionResult> AddProperty([FromBody] AddPropertyCommand command)
{
//commanted code for add operation
}
[HttpPost]
[Route("updateproperties")]
[ProducesResponseType((int)HttpStatusCode.OK)]
[ProducesResponseType((int)HttpStatusCode.BadRequest)]
public async Task<IActionResult> ([FromBody] UpdatePropertyCommand updatePropertyCommand, [FromHeader(Name = "x-requestid")] Guid id)
{
//commanted code for update operation
}
[HttpDelete]
[Route("properties/{id}")]
public async Task<IActionResult> DeleteProperyAsync(DeletePropertyCommand command)
{
//commanted code for deleteoperation
}
Aucun commentaire:
Enregistrer un commentaire