Skip to content

Instantly share code, notes, and snippets.

@nishanc
Created August 6, 2023 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishanc/0b5886f6db87ede440a81bb3915bd25a to your computer and use it in GitHub Desktop.
Save nishanc/0b5886f6db87ede440a81bb3915bd25a to your computer and use it in GitHub Desktop.
[ApiController]
[Route("api/[controller]")]
public class TodosController : Controller
{
[HttpGet("/")]
// [ProducesResponseType(typeof(Todo), StatusCodes.Status200OK)]
[ProducesResponseType<Todo>(StatusCodes.Status200OK)]
public Todo Get() => new Todo(1, "Write a sample", DateTime.Now, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment