mirror of
https://github.com/ldqk/Masuit.Tools.git
synced 2026-10-25 02:00:25 +08:00
22 lines
504 B
C#
22 lines
504 B
C#
using Masuit.Tools.AspNetCore.ModelBinder;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Net;
|
|
|
|
namespace NetCoreTest.Controllers;
|
|
|
|
[ApiController]
|
|
public class HomeController : Controller
|
|
{
|
|
[HttpPost("test")]
|
|
[ProducesResponseType(typeof(MyClass), (int)HttpStatusCode.OK)]
|
|
public async Task<ActionResult> Test([FromBodyOrDefault] MyClass mc)
|
|
{
|
|
return Ok(mc);
|
|
}
|
|
}
|
|
|
|
public class MyClass
|
|
{
|
|
public string MyProperty { get; set; }
|
|
public List<string> List { get; set; }
|
|
} |