-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Description: Defining api model to required=true will not add the Request Validator to the method.
with following sam template and sam cli version 0.40
AWSTemplateFormatVersion : "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"
Globals:
Function:
AutoPublishAlias: live
Runtime: python3.8
Handler: lambda_handler.handler
Resources:
restGateway:
Type: "AWS::Serverless::Api"
Properties:
StageName: default
Models:
SomeModel:
type: object
properties:
keyname:
type: string
required:
- keyname
byIamcToken:
Type: "AWS::Serverless::Function"
Properties:
CodeUri: src.zip
Events:
HttpGet:
Type: Api
Properties:
Path: '/request-path'
Method: post
RestApiId: !Ref restGateway
RequestModel:
Model: SomeModel
Required: true
Observed result:
Request Validator in method settings has value "NONE"
Expected result:
Request Validator in method settings has value "Validate body..."
praneetap, timoschilling, scarlier, Thadir, tangonaf and 105 moreryansonshine, codepay4999, ifurs, gabor-kormany and naseer2426