| Name | Type | Description |
|---|---|---|
| basePath |
|
The base path on which the Controller API is served. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). |
| components |
ComponentsObject
|
OpenAPI components.schemas generated from model metadata |
| paths |
PathsObject
|
The available paths and operations for the API. |
Data structure for REST related metadata
| Name | Type | Description |
|---|---|---|
| path |
string
|
Data structure for REST related metadata |
| spec |
OperationObject
|
Data structure for REST related metadata |
| verb |
string
|
Data structure for REST related metadata |
Get the controller spec for the given class
| Name | Type | Description |
|---|---|---|
| constructor |
Function
|
Controller class |
Decorate the given Controller constructor with metadata describing the HTTP/REST API the Controller implements/provides.
@api can be applied to controller classes. For example,
@api({basePath: '/my'})
class MyController {
// ...
}
| Name | Type | Description |
|---|---|---|
| spec |
ControllerSpec
|
OpenAPI specification describing the endpoints handled by this controller |
Expose a Controller method as a REST API operation
mapped to DELETE request method.
| Name | Type | Description |
|---|---|---|
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Expose a Controller method as a REST API operation
mapped to GET request method.
| Name | Type | Description |
|---|---|---|
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Expose a Controller method as a REST API operation.
| Name | Type | Description |
|---|---|---|
| verb |
string
|
HTTP verb, e.g. |
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Expose a Controller method as a REST API operation
mapped to PATCH request method.
| Name | Type | Description |
|---|---|---|
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Expose a Controller method as a REST API operation
mapped to POST request method.
| Name | Type | Description |
|---|---|---|
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Expose a Controller method as a REST API operation
mapped to PUT request method.
| Name | Type | Description |
|---|---|---|
| path |
string
|
The URL path of this operation, e.g. |
| spec |
OperationObject
|
The OpenAPI specification describing parameters and responses of this operation. |
Define a parameter of array type.
| Name | Type | Description |
|---|---|---|
| name |
string
|
Parameter name |
| source |
ParameterLocation
|
Source of the parameter value |
| itemSpec |
|
Item type for the array or the full item object |
| Name | Type | Description |
|---|---|---|
| binary |
(Anonymous function)
|
Define a parameter of "binary" type that's read from a request header.
Usage: |
| boolean |
(Anonymous function)
|
Define a parameter of "boolean" type that's read from a request header.
Usage: |
| byte |
(Anonymous function)
|
Define a parameter of "byte" type that's read from a request header.
Usage: |
| date |
(Anonymous function)
|
Define a parameter of "date" type that's read from a request header.
Usage: |
| dateTime |
(Anonymous function)
|
Define a parameter of "dateTime" type that's read from a request header.
Usage: |
| double |
(Anonymous function)
|
Define a parameter of "double" type that's read from a request header.
Usage: |
| float |
(Anonymous function)
|
Define a parameter of "float" type that's read from a request header.
Usage: |
| integer |
(Anonymous function)
|
Define a parameter of "integer" type that's read from a request header.
Usage: |
| long |
(Anonymous function)
|
Define a parameter of "long" type that's read from a request header.
Usage: |
| number |
(Anonymous function)
|
Define a parameter of "number" type that's read from a request header.
Usage: |
| password |
(Anonymous function)
|
Define a parameter of "password" type that's read from a request header.
Usage: |
| string |
(Anonymous function)
|
Define a parameter of "string" type that's read from a request header.
Usage: |
| Name | Type | Description |
|---|---|---|
| binary |
(Anonymous function)
|
Define a parameter of "binary" type that's read from request path.
Usage: |
| boolean |
(Anonymous function)
|
Define a parameter of "boolean" type that's read from request path.
Usage: |
| byte |
(Anonymous function)
|
Define a parameter of "byte" type that's read from request path.
Usage: |
| date |
(Anonymous function)
|
Define a parameter of "date" type that's read from request path.
Usage: |
| dateTime |
(Anonymous function)
|
Define a parameter of "dateTime" type that's read from request path.
Usage: |
| double |
(Anonymous function)
|
Define a parameter of "double" type that's read from request path.
Usage: |
| float |
(Anonymous function)
|
Define a parameter of "float" type that's read from request path.
Usage: |
| integer |
(Anonymous function)
|
Define a parameter of "integer" type that's read from request path.
Usage: |
| long |
(Anonymous function)
|
Define a parameter of "long" type that's read from request path.
Usage: |
| number |
(Anonymous function)
|
Define a parameter of "number" type that's read from request path.
Usage: |
| password |
(Anonymous function)
|
Define a parameter of "password" type that's read from request path.
Usage: |
| string |
(Anonymous function)
|
Define a parameter of "string" type that's read from request path.
Usage: |
| Name | Type | Description |
|---|---|---|
| binary |
(Anonymous function)
|
Define a parameter of "binary" type that's read from the query string.
Usage: |
| boolean |
(Anonymous function)
|
Define a parameter of "boolean" type that's read from the query string.
Usage: |
| byte |
(Anonymous function)
|
Define a parameter of "byte" type that's read from the query string.
Usage: |
| date |
(Anonymous function)
|
Define a parameter of "date" type that's read from the query string.
Usage: |
| dateTime |
(Anonymous function)
|
Define a parameter of "dateTime" type that's read from the query string.
Usage: |
| double |
(Anonymous function)
|
Define a parameter of "double" type that's read from the query string.
Usage: |
| float |
(Anonymous function)
|
Define a parameter of "float" type that's read from the query string.
Usage: |
| integer |
(Anonymous function)
|
Define a parameter of "integer" type that's read from the query string.
Usage: |
| long |
(Anonymous function)
|
Define a parameter of "long" type that's read from the query string.
Usage: |
| number |
(Anonymous function)
|
Define a parameter of "number" type that's read from the query string.
Usage: |
| password |
(Anonymous function)
|
Define a parameter of "password" type that's read from the query string.
Usage: |
| string |
(Anonymous function)
|
Define a parameter of "integer" type that's read from the query string.
Usage: |
| Name | Type | Description |
|---|---|---|
| format |
|
|
| type |
string
|
The type and format inferred by a common name of OpenAPI 3.0.0 data type
reference link:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types
Define a requestBody of array type.
| Name | Type | Description |
|---|---|---|
| itemSpec |
|
the full item object |
| properties |
|
The requestBody properties other than |
| Name | Type | Description |
|---|---|---|
| format |
|
|
| type |
|
|
Generate the type and format property in a Schema Object according to a
parameter's type.
type and format will be preserved if provided in schema
| Name | Type | Description |
|---|---|---|
| type |
Function
|
The JavaScript type of a parameter |
| schema |
SchemaObject
|
The schema object provided in an parameter object |
Get OpenAPI Schema for a JavaScript type for a body parameter
| Name | Type | Description |
|---|---|---|
| type |
Function
|
The JavaScript type of an argument deccorated by @requestBody |
| Name | Type | Description |
|---|---|---|
| jsonDef |
JsonDefinition
|