Skip to content

Commit

Permalink
Add docs to point to additionalProperties
Browse files Browse the repository at this point in the history
Documentation to point users towards the Open API 3.0 spec to set
`additionalProperties` to false for validation of the body component
of the request.

See #146
  • Loading branch information
rowanc1 authored Nov 27, 2019
1 parent d8a4a88 commit 3b26c9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ curl -XPOST http://localhost:3000/v1/pets \
}
```

In the api schema you can add `additionalProperties: false` when [describing](https://swagger.io/docs/specification/data-models/keywords/) the `requestBody` to ensure additional body properties are not let through when `validateRequests` is set to `true`.


#### Validates content-type

```shell
Expand Down

0 comments on commit 3b26c9c

Please sign in to comment.