【发布时间】:2020-12-13 09:02:46
【问题描述】:
我创建了一个 Azure Function App。函数应用连接到 SQL DB 并具有以下功能
- 返回表中的所有记录
- 使用以下代码根据列名返回记录
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
string loan_id = req.Query["loanid"];
string loan_amount = req.Query["loanamount"];
if (string.IsNullOrEmpty(loan_id)) {
//Do something when dont give loan id.
} else if (string.IsNullOrEmpty(loan_amount)) {
//DO something when dont give loan amount.
}
return new OkObjectResult("This is a test.");
}
我想使用 API Management/Swagger 记录函数应用。你能告诉我这是如何实现的吗?
提前致谢
【问题讨论】:
标签: azure api azure-functions swagger azure-api-management