简体   繁体   中英

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

I want to do this in the serverless.yml file but can't find the way in the docs.

I'd like to avoid doing this after every deploy from the CLI with something like

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

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

If you are using REST API (API Gateway v1), you can simply write the following in your serverless.yml file.

provider:
  apiGateway:
    description: Your custom description

But I don't have a solution if you are using HTTP API (API Gateway v2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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