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

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.

Screenshot im-01-import-overviewScreenshot im-01-import-overview
im-01-import-overviewMissing

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).

Screenshot im-06-openapi-uploadScreenshot im-06-openapi-upload
im-06-openapi-uploadMissing

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 elementMockomat result
SchemaTable
Schema propertyAttribute, with its type derived from the property
required listRequired flag on the listed attributes
enumAttribute of type Enum
allOfProperties merged into the table
$ref to another selected schemaRelation 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 $ref patterns 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.
Screenshot im-07-openapi-board-resultScreenshot im-07-openapi-board-result
im-07-openapi-board-resultMissing

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:

  1. Export your specification from the tool you use (most API design and testing tools can export OpenAPI).
  2. Import it into Mockomat with the OpenAPI import described above.
  3. Refine the generated model — naming, relations and searchable flags.
  4. Map the data — bind your tables and attributes to the data pool.
  5. 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).

Screenshot im-08-migration-flowScreenshot im-08-migration-flow
im-08-migration-flowMissing

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.