new Endpoint(setup)
Creates a new instance of the Endpoint class.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setup |
Object | The setup object containing endpoint details and configurations. Properties
|
- Source:
Throws:
-
If setup parameters are invalid.
- Type
- Error.Log
Members
controller :function
The controller function handling the endpoint logic.
Type:
- function
- Source:
method :string
The HTTP method for the endpoint.
Type:
- string
- Source:
middlewares :Array.<function()>
Middleware functions to be applied to the endpoint.
Type:
- Array.<function()>
- Source:
routePath :string
The path of the endpoint's route.
Type:
- string
- Source:
Methods
updateBodySchema(data)
Updated the body schema of the endpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object |
- Source: