new RequestAPI(request, bodySchema)
Creates a new instance of the RequestAPI class.
Parameters:
| Name | Type | Description |
|---|---|---|
request |
Object | The request object. |
bodySchema |
Object | The schema object to validate the request body against. |
- Source:
Throws:
-
If the request body fails schema validation.
- Type
- ValidationError
Members
originalRequest
The original request object.
Properties:
| Type | Description |
|---|---|
| Object |
- Source:
Methods
getBody() → {Object}
Returns the validated request body object with any default values applied.
- Source:
Returns:
- The validated request body object.
- Type
- Object