Piotr Grzesik dcc9fc0cab feat(AWS API Gateway): Remove support for request.schema
BREAKING CHANGE: Support for `http.request.schema` has been removed and replaced
with `http.request.schemas`.
2022-01-27 15:21:58 +01:00

59 lines
1.5 KiB
YAML

service: service
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221
apiGateway:
request:
schemas:
test-model:
name: 'TestModel'
description: 'Test Description'
schema: '${file(dummySchema.json)}'
test-model-simple:
schema: '${file(dummySchema.json)}'
unused-model:
name: 'UnusedModel'
description: 'I should not be created'
schema: '${file(dummySchema.json)}'
functions:
target:
handler: target.handler
events:
- http:
path: test-model-full
method: get
request:
schemas:
application/json: test-model
- http:
path: test-model-simple
method: get
request:
schemas:
application/json: test-model-simple
- http:
path: test-direct-simple
method: get
request:
schemas:
application/json: '${file(dummySchema.json)}'
- http:
path: test-direct-full
method: get
request:
schemas:
application/json:
name: TestMethodModel
description: 'Test Method Model Desc'
schema: '${file(dummySchema.json)}'
- http:
path: test-multiple
method: get
request:
schemas:
application/json: '${file(dummySchema.json)}'
text/plain: 'foo'