You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a new brand controller and put it under the v2 folder.
I wrote the following code and when swagger runs I get an error
Am I making a mistake?
[ApiVersion("2.0")]
public class BrandsController : VersionedApiController
{
[MapToApiVersion("2.0")]
[HttpPost("search")]
[MustHavePermission(FSHAction.Search, FSHResource.Brands)]
[OpenApiOperation("Search brands using available filters.", "")]
public Task<PaginationResponse> SearchAsync(SearchBrandsRequest request)
{
return Mediator.Send(request);
}
}
result error : The method 'get' on path '/api/tenants' is registered multiple times.
The text was updated successfully, but these errors were encountered:
I opened a new project and added a new brandcontroller under the Host/Catalog/v2.
this code
namespace FSH.Starter.Host.Controllers.V2;
[ApiVersion("2.0")]
public class BrandsController : VersionedApiController
{
[MapToApiVersion("2.0")]
[HttpPost("search")]
[MustHavePermission(FSHAction.Search, FSHResource.Brands)]
[OpenApiOperation("Search brands using available filters.", "")]
public Task<PaginationResponse> SearchAsync(SearchBrandsRequest request)
{
return Mediator.Send(request);
}
}
I created a new brand controller and put it under the v2 folder.
I wrote the following code and when swagger runs I get an error
Am I making a mistake?
[ApiVersion("2.0")]
public class BrandsController : VersionedApiController
{
[MapToApiVersion("2.0")]
[HttpPost("search")]
[MustHavePermission(FSHAction.Search, FSHResource.Brands)]
[OpenApiOperation("Search brands using available filters.", "")]
public Task<PaginationResponse> SearchAsync(SearchBrandsRequest request)
{
return Mediator.Send(request);
}
}
result error : The method 'get' on path '/api/tenants' is registered multiple times.
The text was updated successfully, but these errors were encountered: