Mocking an OData service
Right-click a folder ▸ Add ▸ OData server.
Configuring
Section titled “Configuring”| Field | Role |
|---|---|
| Mock metadata | The CSDL document, served as it is on $metadata |
| Mock data | A JSON object: entity set name → array of objects |

What the server really does
Section titled “What the server really does”This is the point that sets this server apart from simply returning frozen JSON: Restorm applies the system options to your mock data.
A client calling:
GET localhost:8080/Clients?$filter=pays eq 'FR'&$select=id,nom&$top=10&$count=truegets a result that really is filtered, projected, truncated and counted.
The options supported: $filter, $select, $orderby, $top, $skip,
$count, $expand and $batch.
What it is for
Section titled “What it is for”Developing against an OData service before it exists, or reproducing a precise data set for a test — without standing up a full OData server, which is rarely a pleasant afternoon.
Since the $metadata document is served as it is, client tools (Restorm’s own
OData import included) can discover the
service as normal.
In a scenario
Section titled “In a scenario”The OData server and OData server close actions. See Hosted servers.