Import & Migration
Import brings an existing API contract into Mockomat. OpenAPI import reads an OpenAPI specification and creates tables, attributes and relations on your modelling board, so you start from your contract instead of an empty canvas.
The data your mock API serves is not imported by you: it comes from Mockomat's data pool, which our team imports and maintains. You connect your tables to it through mapping (see Data Sources & Field Mapping). You cannot upload your own datasets.


Import section overview: OpenAPI import into a project.
OpenAPI Import
OpenAPI import generates a Mockomat model from an existing API specification. It is made for teams that already have a contract and want a mock API without defining every table and attribute by hand.
Supported Specifications
- OpenAPI 3.x and Swagger 2.0
- JSON or YAML
- Up to 1 MB per file, up to 50 schemas per import
- Into a new project or an existing project — on every plan, guest sessions included
A new project counts toward your plan's project limit, and the tables count toward its table limit.
Import Workflow
1. Provide the Specification
Paste or upload your OpenAPI specification. Mockomat parses it and lists the schemas under components (or definitions in Swagger 2.0).


OpenAPI specification upload dialog with schema selection.
2. Select Schemas
Choose the schemas to import (up to 50). Unselected schemas are skipped.
3. Model Generation
Each selected schema becomes a table:
| OpenAPI element | Mockomat result |
|---|---|
| Schema | Table |
| Schema property | Attribute, with its type derived from the property |
required list | Required flag on the listed attributes |
enum | Attribute of type Enum |
allOf | Properties merged into the table |
$ref to another selected schema | Relation between the two tables |
Mockomat then creates the default list and detail operations for the new tables.
4. Refinement
The generated model is a starting point. After import, review and adjust:
- Table and attribute names — rename where the schema names do not match your conventions.
- Relations — check direction and cardinality; some
$refpatterns are ambiguous. - Data mappings — imported attributes start as Data Source mappings without a bound column. Bind each table and its attributes to the data pool, otherwise the mock API returns no rows for it. See Data Sources & Field Mapping.
- Searchable attributes — mark the fields consumers search in; imported attributes start with all flags switched off.
- Operations — add parameters and adjust page sizes in API Design.


Modelling board populated with tables generated from an OpenAPI specification.
What Needs Manual Configuration
- Data mappings — binding tables and attributes to the data pool.
- Precise relation cardinality — especially m:n relations, which OpenAPI does not state explicitly.
- Searchable flags — imported attributes start with all flags switched off.
- Operation parameters — the filters your consumers need.
Migration from Other Tools
OpenAPI is the interchange format for moving from other mock servers or API design tools:
- Export your specification from the tool you use (most API design and testing tools can export OpenAPI).
- Import it into Mockomat with the OpenAPI import described above.
- Refine the generated model — naming, relations and searchable flags.
- Map the data — bind your tables and attributes to the data pool.
- Validate in the runtime preview — run queries to confirm the mock API behaves as expected.
There is no direct import from proprietary mock server formats (e.g., WireMock mappings or MockServer expectations).


Migration workflow from external tools through OpenAPI specification to Mockomat model.
The Way Back: OpenAPI Export
Any project in an account can be exported as an OpenAPI 3.0.3 specification again — useful to hand your refined model back to other tools. See Export.
Summary
OpenAPI import turns an existing contract into a Mockomat model in minutes. The data comes from Mockomat's data pool through mapping, so after an import the remaining work is naming, relations, mapping and operations — then the mock API is ready.