SettingExporter Class
export model info into loopback-with-admin's format (loopback-with-admin >=v1.8.0) only available in Node.js
Item Index
Methods
createCustomRoleDefinitions
()
Object
Create definitions of custom roles (for ACL).
Prepare directory containing js files exporting a function to pass to Role.registerResolver(name, fn) https://docs.strongloop.com/display/public/LB/Defining+and+using+roles http://apidocs.strongloop.com/loopback/#role-registerresolver
Define the directory as Facade#customRolePath or move the directory to Facade#dirname + '/custom-roles'
The name of each custom role is the filename without extension. e.g. team-member.js : team-member
Returns:
Object:
createModelDefinitions
()
Object
private
Create ModelDefinitions
- load all the entities
- check each entity's repository is LoopbackRepository
- create ModelDefinition
- add "hasMany" relations
- add "hasManyThrough" relations
- add custom relations
- return object
Returns:
Object:
export
()
Object
public
Create loopback definition setting object
Returns:
Object: