serverless / serverless/examples

Request Parameters aren't checked by API Gateway

Open
#513 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.5k
Forks
4.4k
Avg merge
2h 55m
Merged PRs (30d)
3

Description

Hi guys,

I tried to use the following syntax to enforce parameter check by the api gateway to not check it in the code:

https://www.serverless.com/framework/docs/providers/aws/events/apigateway/#request-schema-validators

image

Api gateway doesn't return a 400 if the path parameter isn't provided.

When I manually adjust the request validator like in the screenshot it works.

image

Is there any way to set the feature with sls or cf? The manually process is not production ready for me.
Thanks in advance,
Patrick

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked request-schema validators documentation and compare its configuration with the API Gateway request validator shown in the report. Reproduce the missing 400 response for an omitted path parameter, then verify that the Serverless or CloudFormation configuration creates the equivalent validator without manual console changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.