Appends serverless function http events from OpenAPI spec.
Add API spec file to serverless.yml
and define function just handler
custom:
openapi:
spec: docs/api-spec.yaml
functions:
UserList:
handler: src/users.js
Add x-serverless-lambda
to path definition
paths:
/users:
get:
responses:
200:
description: User Found
schema:
$ref: '#/definitions/User'
x-serverless-lambda:
function: UserList
authorizer: aws_iam