Код: Выделить всё
///
///
///
[Authorize]
[ApiController]
[ApiVersion("1.0")]
[Route("api/v{version:apiVersion}/bank-data")]
public class BankDataController : ControllerBase
{
#region FIELDS
private readonly IService _service;
#endregion
#region CONSTRUCTORS
///
///
///
///
public BankDataController(IService service)
{
_service = service ?? throw new ArgumentNullException(nameof(service));
}
#endregion
#region METHODS
///
/// Get Bank Detail
///
///
[HttpGet]
[Route("{code}/data/{progressive}")]
[OpenApiOperation("getBankData")]
[ProducesResponseType(type: typeof(BankDataDetailDto), statusCode: StatusCodes.Status200OK)]
[ProducesResponseType(type: typeof(ForbiddenResponse), statusCode: StatusCodes.Status403Forbidden)]
[ProducesResponseType(type: typeof(BadRequestResponse), statusCode: StatusCodes.Status400BadRequest)]
[ProducesResponseType(type: typeof(UnAuthorizedResponse), statusCode: StatusCodes.Status401Unauthorized)]
[ProducesResponseType(type: typeof(InternalServerErrorResponse), statusCode: StatusCodes.Status500InternalServerError)]
public async Task GetBankData(Guid code, int progressive)
{
var result = await _service.GetBankDataDetail(code, progressive);
return Ok(result);
}
#endregion
}
Это URL-адрес, напечатанный Swagger -> http://localhost:44747/api/v1/bank-data ... 90/data/11
Но ответ:
Код: Выделить всё
date: Tue,02 Jul 2024 15:03:42 GMT
server: Microsoft-IIS/10.0
transfer-encoding: chunked
x-powered-by: ASP.NET
Подробнее здесь: https://stackoverflow.com/questions/786 ... s-returned