Constructor
new ODataMockGenerator(metadata, optionsopt)
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
metadata |
string | OData metadata XML | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
{} | Generation options and rules
Properties
|
- Source:
Classes
Methods
_applyRelationships(oMockData)
Generates relationships between entities mentioned in the configuration
Parameters:
Name | Type | Description |
---|---|---|
oMockData |
Object | incoming data |
- Source:
createMockData() → {Object}
Generates mock data based on the metadata and options passed to the constructor
- Source:
Returns:
Generated data in form { EntitySet1: [{ ..properties.. }], EntitySet2: [{ .. properties.. }] }
- Type
- Object