![]() ![]() Note: This value will not be passed into remote methods function if argument is not present. Additionally, callback arguments allow a special type "file" see below.ĭefault value that will be used to populate loopback-explorer input fields and swagger documentation. Otherwise the root object returned is a map (argument-name to argument-value).Īrgument datatype must be a Loopback type. If your function has a single callback argument to use as the root object returned to remote caller. True if argument is required false otherwise.įor callback arguments: set this property to true header sets the http.header or arg named header to the value.status sets the res.statusCode to the provided value. ![]() Map the callback argument value to the HTTP response object. See HTTP mapping of input arguments below. You can put long strings in an array if needed (see note above).įor input arguments: a function or an object describing mapping from HTTP request to the argument value. This is used by API documentation generators like OpenAPI (formerly Swagger). Property (key)Ī text description of the argument. The following table describes the properties of each individual argument. The accepts and returns options properties define either a single argument as an object or an ordered set of arguments as an array. One of:ĭefault HTTP status set when the callback is called without an error.ĭefault HTTP status set when the callback is called with an error. HTTP method (verb) at which the method is available. HTTP path (relative to the model) at which the method is exposed. The http property provides information on HTTP route at which the remote The err argument is assumed do not specify.ĭefault if not provided is the empty array. If set to false, this method will not be present in generated OpenAPI (formerly Swagger) documentation.ĭescribes the remote method's callback arguments See Argument descriptions. Specifies information about the route at which the method is exposed.Īdditional notes, used by OpenAPI (formerly Swagger). You can put long strings in an array if needed (see note below). Text description of the method, used by API documentation generators such as OpenAPI (formerly Swagger). The default value is a list with a single scope DEFAULT. The scopes defined by `accessScopes` list. Method only when their access token was granted at least one of A user will be allowed to invoke this remote For more information, see Argument descriptions. Name is the first argument, age is the second argument and callback is automatically provided by LoopBack (do not specify it in your accepts array). ![]() For the example above, the function signature is eet(name, age, callback). Optionĭefines arguments that the remote method accepts that map to the static method you define. However, if the remote method requires arguments, you must specify accepts if the remote method returns a value, you must specify returns. All of the options properties are optional. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |