-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
I'm working on a solution using ABP. When I run the application, Swagger correctly displays all the endpoints. I want to customize the Register action in AccountController, but I found that overriding it directly causes issues in Swagger.
Is there a recommended way in ABP to modify the behavior of the Register endpoint without breaking Swagger? Any guidance would be greatly appreciated.
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
using Volo.Abp.Account;
using Volo.Abp.Account.Web.Areas.Account.Controllers;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
[Route("api/account")]
public class CustomAccountController : Volo.Abp.Account.AccountController
{
public CustomAccountController(IAccountAppService accountAppService) : base(accountAppService)
{
}
[HttpPost("register")]
public Task<IdentityUserDto> RegisterAsync([FromBody] RegisterDto model)
{
return Task.FromResult(new IdentityUserDto
{
Id = Guid.NewGuid(),
UserName = model.UserName
});
}
}
Metadata
Metadata
Assignees
Labels
No labels