Testing phaseThis environment is in pre-launch testing — all data will be reset at launch.
Skip to content

Views ​

A view is how a table's data is presented in the runtime preview of the app. Every table has a view from the start: all attributes in model order, bound to the table's default list and detail operations, with the table name as its title. When you change something, Mockomat stores only what you changed — Reset to default brings the view back to the derived defaults.

Views do not change your mock API. API consumers always receive every mapped attribute of the records they query; the operation names, parameters and default page sizes they rely on are set in API Design.

Screenshot ws-views-01-overviewScreenshot ws-views-01-overview
ws-views-01-overviewMissing

Runtime preview with the view settings of a table.

What You Can Customize ​

Open the view of a table with the play button on its table card, then choose Modify view:

SettingEffect in the runtime preview
View nameThe title shown for the table's data
ColumnsWhich attributes the preview shows, and in which order
Default sortThe initial ordering of the preview list (field and direction)
Operation bindingWhich list and detail operation the preview uses — by default the table's own operations

Changes show up in the live preview while you edit.

Columns ​

The column editor includes, excludes and reorders attributes:

  • Include or exclude an attribute to add it to the view or remove it.
  • Hide a column with the eye toggle to keep it in the view without showing it.
  • Drag columns to change their order.

These settings affect the preview only. The mock API response always carries every mapped attribute.

Screenshot ws-views-03-column-configScreenshot ws-views-03-column-config
ws-views-03-column-configMissing

Column editor with included, hidden and excluded attributes.

Default Sort ​

The default sort orders the preview list when you open it — for time-series data, a date field descending is usually the most useful. For API consumers, the default ordering comes from the operation in API Design; consumers can always pass their own sortField and sortDirection.

Operation Binding ​

A view uses the table's default list and detail operations. You almost never need to change this. Bind a different operation when the preview should show a custom operation, for example one with scope filters.

If the binding is missing, the preview shows No API binding and loads no data. If the table has no identifier field, the preview shows No identifier field and clicking a row opens no detail view.

Screenshot ws-views-05-api-bindingScreenshot ws-views-05-api-binding
ws-views-05-api-bindingMissing

Operation binding of a view with the table's default operations.

Views and the Mock API ​

View settingRuntime previewMock API response
Columns (include, hide, order)Which columns show, in which orderNo effect — every mapped attribute is returned
Default sortInitial ordering of the listNo effect — the operation's default sort applies
View nameTitle of the dataNo effect
Operation bindingWhich operation the preview runsNo effect — consumers name the operation in their query

Working with the Modelling Board ​

The play button on each table card is the fastest path to the runtime preview of a table. When you spot an issue there, use Go to Modelling Board to return to the board, or Go to API Design to adjust the operation.

Summary ​

Views are the presentation layer of the runtime preview: columns, default sort, title and operation binding. They help you inspect your data; the contract your consumers rely on lives in your model, your mappings and the operations in API Design.