using EC.App.Core; using Furion.DataValidation; using Microsoft.AspNetCore.Mvc; using System; using System.ComponentModel.DataAnnotations; namespace OnvifWebServer.Controllers.Onvif { [ApiController] [ApiDescriptionSettings("Test")] [Route("test/[controller]")] public class TestController : ApiController { public TestController() { } [HttpGet] public string TestString(string ip) { return ip; } [HttpGet] public string TestValid([Required][DataValidation(ValidationTypes.IPv4)] string ip) { return ip; } [HttpGet] public string TestException(string ip) { throw new Exception("test"); return ip; } } }