Some LoopBack connectors require
that the data model to be interacted with is defined through a LoopBack JSON model. When the
LoopBackRequest node interacts
for the first time with a named LoopBack object,
which is either specified as a node property or dynamically overridden
in the local environment, it looks for a LoopBack JSON model file in a subdirectory
of the directory that contains the
datasources.json file.
This subdirectory, which you must create, must have exactly the same
name and case as the data-source stanza that is specified on the
LoopBackRequest node. For example,
if the
datasources.json file is provided only
at the node location, the model would be:
workpath/connectors/loopback/datasource_name/model_name.json
The
model_name part
of the
model_name.json file
must match exactly (including the case) the
LoopBack object name
that is either specified on the
LoopBackRequest node or overridden
with the
LocalEnvironment.Destination.Loopback.Request.object local
environment variable.
The
following example shows how you could provide LoopBack JSON model files for working with
the dev and staging MongoDB data
sources: