Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger 一直转圈圈,发现是BaseVM的原因 #600

Open
alook123 opened this issue Mar 17, 2023 · 1 comment
Open

swagger 一直转圈圈,发现是BaseVM的原因 #600

alook123 opened this issue Mar 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@alook123
Copy link

swagger 一直转圈圈,发现是BaseVM的原因
以下是vm的代码:

        public class TestVM : BaseVM
        {
            public string TestName { get; set; }
        }

以下是api的代码:

        [ActionDescription("测试")]
        [HttpPost("Test")]
        public ActionResult Test([FromForm] TestVM vm)
        {
            return Ok();
        }

运行后,后台页面正常,打开swagger ,会一直转圈圈,尝试多次后,发现不继承BaseVM,swagger 就能正常打开

@alook123 alook123 added the bug Something isn't working label Mar 17, 2023
@liuliang-wt
Copy link
Collaborator

如果不加[FromForm]是可以的,我也没明白是为啥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants