Skip to content

Commit 64771c5

Browse files
committed
Initial commit.
0 parents  commit 64771c5

File tree

9 files changed

+6030
-0
lines changed

9 files changed

+6030
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.DS_Store
2+
/coverage
3+
/dist
4+
/node_modules
5+
/package-lock.json
6+
/yarn.lock
7+
npm-debug.log

.npmignore

Whitespace-only changes.

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2021, Jardel Weyrich <jweyrich at gmail dot com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# serverless-disable-request-validators
2+
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com) [![npm version](https://badge.fury.io/js/serverless-disable-request-validators.svg)](https://badge.fury.io/js/serverless-disable-request-validators) [![Build Status](https://travis-ci.org/jweyrich/serverless-disable-request-validators.svg?branch=master)](https://travis-ci.org/prisma/serverless-plugin-typescript)
3+
4+
Serverless v2 plugin to disable API Gateway request validators.
5+
6+
## What it does
7+
8+
It gives you the [ability to disable the API Gateway Request Validator on v2](https://github.com/serverless/serverless/issues/10229) until the Serverless Framework team introduces an opt-out flag or another mechanism to avoid the automatic creation of Request Validators in API Gateway when your Lambda functions have an schema associated with them.
9+
10+
There are 3 legitimate use cases for these schemas:
11+
12+
1. Apply basic request validation at the API Gateway level (before it reaches the Lambda);
13+
2. Export the API definition in another format - https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-export-api.html
14+
3. Generate a client SDK for some languages - https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-generate-sdk-console.html
15+
16+
If you want cases 2 and 3 but not case 1, this plugin can help you!
17+
18+
## Install
19+
20+
```sh
21+
yarn add --dev serverless-disable-request-validators
22+
# or
23+
npm install -D serverless-disable-request-validators
24+
```
25+
26+
Add the following plugin to your `serverless.yml`:
27+
28+
```yaml
29+
plugins:
30+
- serverless-disable-request-validators
31+
```
32+
33+
## Configure
34+
35+
There's nothing to configure! ;-)

0 commit comments

Comments
 (0)