mirror of
https://github.com/nsnail/IGeekFan.AspNetCore.Knife4jUI.git
synced 2025-08-04 09:47:58 +08:00
添加项目文件。
This commit is contained in:
38
test/Basic/Controllers/FromQueryParamsController.cs
Normal file
38
test/Basic/Controllers/FromQueryParamsController.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Basic.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
public class FromQueryParamsController
|
||||
{
|
||||
[HttpGet("addresses/validate")]
|
||||
public IActionResult ValidateAddress([FromQuery]Address address)
|
||||
{
|
||||
return new NoContentResult();
|
||||
}
|
||||
|
||||
[HttpGet("zip-codes/validate")]
|
||||
public IActionResult ValidateZipCodes([FromQuery]IEnumerable<string> zipCodes)
|
||||
{
|
||||
return new NoContentResult();
|
||||
}
|
||||
}
|
||||
|
||||
public class Address
|
||||
{
|
||||
/// <summary>
|
||||
/// 3-letter ISO country code
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string Country { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of city
|
||||
/// </summary>
|
||||
[DefaultValue("Seattle")]
|
||||
public string City { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user