繁体   English   中英

如何使用无服务器框架为 API 网关设置描述?

[英]How to set a description for an API Gateway using the Serverless Framework?

我想在 serverless.yml 文件中执行此操作,但在文档中找不到方法。

我想在每次从 CLI 部署之后避免这样做

aws apigateway update-rest-api --rest-api-id <id> --patch-operations op=replace,path=/description,value='description'

您是否尝试过serverless-aws-documentation插件?

如果您使用的是 REST API(API 网关 v1),您只需在serverless.yml文件中写入以下内容即可。

provider:
  apiGateway:
    description: Your custom description

但如果您使用的是 HTTP API(API 网关 v2),我没有解决方案

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM