Members
routePath
Generate the route path for a given name.
transformResult
Transform the result before sending the response.
Methods
(async) _handleError(err, req, reply) → {Object}
Handle general errors.
| Name | Type | Description |
|---|---|---|
err | Object | The error object |
req | Object | The request object |
reply | Object | The reply object |
The transformed result
- Type:
- Object
(async) _handleNotFound(erropt, req, reply) → {Object}
Handle not found errors.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
err | Object | <optional> | {} | The error object |
req | Object | The request object | ||
reply | Object | The reply object |
The transformed result
- Type:
- Object
(async) _handleResponse() → {void}
Handle the response.
- Type:
- void
(async) _handleSubApp()
Handle sub-applications by collecting and registering their routes.
(async) _routeByModelBuilder(options) → {Object}
Build a route based on the model configuration.
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The options for building the route Properties
|
The built route
- Type:
- Object
(async) _routeByVerb(options) → {Object}
Build a route based on the HTTP verb.
| Name | Type | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The options for building the route Properties
|
The built route
- Type:
- Object
(async) _serveRoute(options) → {Object}
Serve a route.
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The options for serving the route Properties
|
The served route
- Type:
- Object
docSchemaDescription(method) → {string}
Generate the schema description for a given method.
| Name | Type | Description |
|---|---|---|
method | string | The method name |
The schema description
- Type:
- string
(async) docSchemaForFind(items) → {Object}
Generate the schema for the "find" operation.
| Name | Type | Description |
|---|---|---|
items | Object | The items schema |
The schema for the "find" operation
- Type:
- Object
(async) docSchemaGeneral() → {Object}
Generate the general schema for the API responses.
The general schema for API responses
- Type:
- Object
(async) docSchemaLib(name, obj)
Add a schema to the library.
| Name | Type | Description |
|---|---|---|
name | string | The name of the schema |
obj | Object | The schema object |
(async) docSchemaModel(param0) → {Object}
Generate the schema for a model method.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param0 | Object | The parameters for generating the schema Properties
|
The generated schema
- Type:
- Object
(async) docSchemaParams(paramName, …args) → {void}
Generate the schema for query parameters.
| Name | Type | Attributes | Description |
|---|---|---|---|
paramName | string | The name of the parameter | |
args | string | <repeatable> | The arguments for the parameter schema |
- Type:
- void
(async) docSchemaQs(paramName, …args) → {void}
Generate the schema for query string parameters.
| Name | Type | Attributes | Description |
|---|---|---|---|
paramName | string | The name of the parameter | |
args | string | <repeatable> | The arguments for the parameter schema |
- Type:
- void
(async) init()
Initialize the plugin.