CodeCoupler UI DataSource Mixin "Loopback"
A DataSource Mixin handling REST endpoints of the Loopback 4 Framework with token based authentication.
In the configuration object you can use all the CodeCoupler DataSource options except:
serverFiltering
transport.read
transport.create
transport.destroy
trasport.update
IMPORTANT: Set at least the schema.model.id
, otherwise update
and delete
will not work.
Additionally you have to set new added properties in transport
with the following properties:
- base: string
The base URI to the REST API you want to access. This is the URI without the modelname. The URI can optionally ends with a slash, but it must not.
- controller: string
The name of the controler you want to access. The complete URI will be built by concatenating the base URI with the controller name.
- include: object[]
Include filter to use on each "read" as object. Should be null if not used.
Syntax:
[ { relation: "modelName", scope: {...} } ]
- The property must be an array
- The modelName is the the camelCase name of the model starting with a lower letter.
-
The property "scope" is optional. There you can define recursively filters and further includes.
-
useGeneratedId: boolean
This defaults to "true" and the id field will be deleted in the "create" request. Otherwise Loopback will throw an exception.
How to set defaults:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|