Skip to content

Commit

Permalink
Informa tipo de retorno para o SWAGGER (Status201Created) #4
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-oldra committed Apr 22, 2024
1 parent c4c55e3 commit 0ca3cb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Agenda.API/Controllers/ContatoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task<IActionResult> GetAll()
/// <response code="201">Sucesso</response>
/// <response code="400">Dados inválidos</response>
[HttpPost]
[ProducesResponseType(StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(ContatoViewModel))]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Post(ContatoPostInputModel model)
{
Expand Down
2 changes: 1 addition & 1 deletion Agenda.API/Controllers/EventoController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public async Task<IActionResult> GetAll()
/// <response code="201">Sucesso</response>
/// <response code="400">Dados inválidos</response>
[HttpPost]
[ProducesResponseType(StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(EventoViewModel))]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Post(EventoPostInputModel model)
{
Expand Down
2 changes: 1 addition & 1 deletion Agenda.API/Controllers/TarefaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task<IActionResult> GetAll()
/// <response code="201">Sucesso</response>
/// <response code="400">Dados inválidos</response>
[HttpPost]
[ProducesResponseType(StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(TarefaViewModel))]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> Post(TarefaPostInputModel model)
{
Expand Down

0 comments on commit 0ca3cb5

Please sign in to comment.