From 31743bfad633dda076c2daa819dbabb13798bb6b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 8 Feb 2022 13:44:07 +0100 Subject: [PATCH] Config schema: add `websocketsDescription` I used it back with the v1 version, and now on v2 (at least) I got a _Configuration warning_ when defining that value: ``` Serverless: Configuration warning at 'provider': unrecognized property 'websocketsDescription' ``` The value is used in different places but is missing in the config schema. I've also updated the doc about it. --- docs/providers/aws/events/websocket.md | 1 + docs/providers/aws/guide/serverless.yml.md | 2 ++ lib/plugins/aws/provider.js | 1 + 3 files changed, 4 insertions(+) diff --git a/docs/providers/aws/events/websocket.md b/docs/providers/aws/events/websocket.md index 2d890601433..798ab837d8b 100644 --- a/docs/providers/aws/events/websocket.md +++ b/docs/providers/aws/events/websocket.md @@ -78,6 +78,7 @@ provider: runtime: nodejs12.x websocketsApiName: custom-websockets-api-name websocketsApiRouteSelectionExpression: $request.body.action # custom routes are selected by the value of the action property in the body + websocketsDescription: Custom Serverless Websockets functions: connectionHandler: diff --git a/docs/providers/aws/guide/serverless.yml.md b/docs/providers/aws/guide/serverless.yml.md index fce4c91ae10..6da45e38595 100644 --- a/docs/providers/aws/guide/serverless.yml.md +++ b/docs/providers/aws/guide/serverless.yml.md @@ -241,6 +241,8 @@ provider: websocketsApiName: custom-websockets-api-name # custom route selection expression websocketsApiRouteSelectionExpression: $request.body.route + # Use a custom description for the websockets API + websocketsDescription: Custom Serverless Websockets # Optional API Gateway REST API global config apiGateway: # Attach to an externally created REST API via its ID: diff --git a/lib/plugins/aws/provider.js b/lib/plugins/aws/provider.js index 0c0de407da4..ef008314113 100644 --- a/lib/plugins/aws/provider.js +++ b/lib/plugins/aws/provider.js @@ -1183,6 +1183,7 @@ class AwsProvider { versionFunctions: { $ref: '#/definitions/awsLambdaVersioning' }, websocketsApiName: { type: 'string' }, websocketsApiRouteSelectionExpression: { type: 'string' }, + websocketsDescription: { type: 'string' }, }, }, function: {