tweak List max lengths, add v1 versioning

This commit is contained in:
Collin M. Barrett 2017-04-10 19:55:34 -05:00
parent a59dc92259
commit b79354e097
2 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,8 @@
namespace FilterLists.Api.Controllers
{
[Route("[controller]")]
//TODO: automate URL versioning
[Route("v1/[controller]")]
public class ListsController : Controller
{
private readonly IListService _listService;
@ -15,7 +16,7 @@ public ListsController(IListService listService)
// GET lists
[HttpGet]
public JsonResult Get()
public IActionResult Get()
{
var result = Json(_listService.GetAll());
return result;

View file

@ -1,11 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
namespace FilterLists.Models
{
public class List : BaseEntity
{
[MaxLength(512)]
[MaxLength(1022)]
public string Description { get; set; }
[MaxLength(2083)]
@ -32,7 +31,7 @@ public class List : BaseEntity
[MinLength(6)]
public string IssuesUrl { get; set; }
[MaxLength(64)]
[MaxLength(510)]
public string Name { get; set; }
[Required]