Add response types for swagger docs gen
This commit is contained in:
parent
b19f46ff92
commit
0fd2523629
@ -1,3 +1,4 @@
|
||||
using LeedsBeerQuest.API.Data.Models;
|
||||
using LeedsBeerQuest.API.Data.Services.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@ -15,6 +16,7 @@ public class CategoryController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(Category), StatusCodes.Status200OK)]
|
||||
public async Task<IActionResult> GetCategories()
|
||||
{
|
||||
var categories = await _categoryService.GetCategories();
|
||||
|
@ -1,3 +1,4 @@
|
||||
using LeedsBeerQuest.API.Data.Models;
|
||||
using LeedsBeerQuest.API.Data.Services.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@ -15,6 +16,7 @@ public class TagController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(Tag), StatusCodes.Status200OK)]
|
||||
public async Task<IActionResult> GetTags()
|
||||
{
|
||||
var tags = await _tagService.GetTags();
|
||||
|
@ -1,3 +1,4 @@
|
||||
using LeedsBeerQuest.API.Data.Models;
|
||||
using LeedsBeerQuest.API.Data.Services.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@ -14,6 +15,7 @@ public class VenueController : ControllerBase
|
||||
_venueService = venueService;
|
||||
}
|
||||
|
||||
[ProducesResponseType(typeof(IEnumerable<Venue>), StatusCodes.Status200OK)]
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetVenues(
|
||||
[FromQuery] string? search = null,
|
||||
@ -25,6 +27,9 @@ public class VenueController : ControllerBase
|
||||
return Ok(venues);
|
||||
}
|
||||
|
||||
[ProducesResponseType(typeof(Venue), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status400BadRequest)]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[HttpGet("{venueId:int}")]
|
||||
public async Task<IActionResult> GetVenue(int venueId)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user