Usage
Arguments
Path to the input file to import. Supports OpenAPI (JSON/YAML), Postman collections, WireMock mappings, and Mockoon environments.
Path where the converted Apicentric service definition will be written. The output is always in YAML format.
Options
Path to the configuration file (global option).
Execution mode override:
ci, development, or debug (global option).Show what would be imported without actually creating the output file (global option).
Enable verbose output for detailed logging (global option).
Path to the SQLite database for simulator storage (global option).
Supported formats
The import command automatically detects the input format:OpenAPI / Swagger
- OpenAPI 3.x (JSON or YAML)
- Swagger 2.0 (JSON or YAML)
- Auto-detected by presence of
openapiorswaggerfield
Postman Collections
- Postman Collection v2.x (JSON)
- Auto-detected by presence of
info._postman_idfield
WireMock
- WireMock JSON mappings
- Single mapping or array of mappings
- Auto-detected by
requestandresponsefields
Mockoon
- Mockoon environment files (JSON)
- Auto-detected by
source,routes, andidfields
Examples
Import OpenAPI specification
Import Postman collection
Import WireMock mapping
Import Mockoon environment
Auto-detection fallback
If the format cannot be determined:Dry run mode
How it works
The import process:- Read the input file - Loads the content from the specified path
- Auto-detect format - Analyzes the structure to identify the format
- Convert to Apicentric format - Transforms the specification into a service definition
- Write output - Saves the converted YAML to the output path
The converted service definition can be immediately used with
simulator start or further customized for your needs.Use cases
Migrate from OpenAPI
Import Postman collections for testing
Migrate from other mock tools
Batch conversion
Conversion details
OpenAPI conversion
- Paths → Endpoints
- Operations → HTTP methods
- Schemas → Type definitions
- Responses → Response configurations
- Security → Authentication settings
Postman conversion
- Requests → Endpoints
- Examples → Response scenarios
- Variables → Service configuration
- Pre-request scripts → Custom logic (where applicable)
WireMock conversion
- Request matchers → Endpoint routes
- Response templates → Response bodies
- Stubs → Endpoint definitions
- Scenarios → State-based responses
Mockoon conversion
- Routes → Endpoints
- Route responses → Response configurations
- Environment settings → Server configuration
- Data buckets → Reusable data definitions
Related commands
simulator export- Export service definitions to other formatssimulator validate- Validate the imported service definitionsimulator start- Start simulator with imported services