A model class userQuery
that I have written isn't showing up in Swagger UI. I have referenced it in my controller file so I expected it to show up in the Swagger UI. I use SwashBuckle. What am I missing here?
The controller file having an endpoint:
using Project.Models;
namespace Project.Controllers
{
[HttpGet]
[Authorize(Policy = "Read-Run")]
[Route("byRoute/{element}")]
[Produces(typeof(EntityResult<EntityResponse>))]
public async Task<IActionResult> ListEntities([FromQuery] userQuery entityMatch, string element)
{
return Ok((await _entityService.ListEntities(entityMatch, element)));
}
}
Model class:
using System;
namespace Project.Models
{
public class UserQuery
{
public int Id { get; set; }
public DateTime? DateCreated { get; set; }
public DateTime? DateUpdated { get; set; }
}
}