Skip to content

Commit

Permalink
Config schema: add websocketsDescription
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
j0k3r committed Feb 8, 2022
1 parent e66c865 commit 31743bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/providers/aws/events/websocket.md
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions docs/providers/aws/guide/serverless.yml.md
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/aws/provider.js
Expand Up @@ -1183,6 +1183,7 @@ class AwsProvider {
versionFunctions: { $ref: '#/definitions/awsLambdaVersioning' },
websocketsApiName: { type: 'string' },
websocketsApiRouteSelectionExpression: { type: 'string' },
websocketsDescription: { type: 'string' },
},
},
function: {
Expand Down

0 comments on commit 31743bf

Please sign in to comment.