import_mocks
Import mock definitions from OpenAPI, Postman, HAR, WireMock, cURL, or mockd formats. Supports inline content or file paths with format auto-detection and dry-run preview.
Instructions
Import mocks from inline content or a file on the mockd server's filesystem. Supports OpenAPI, Postman, HAR, WireMock, cURL, and mockd YAML/JSON formats. Format is auto-detected if not specified. Use dryRun=true to preview without applying. Use the file parameter for large specs that are too large for inline content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Mock definition content (YAML, JSON, OpenAPI spec, Postman collection, HAR, WireMock, or cURL) | |
| dryRun | No | Parse and validate without applying. Returns a summary of what would be imported. | |
| file | No | Path to a file on the mockd server's filesystem to import. Use this for large specs (OpenAPI, Postman, etc.) that are too large for inline content. Mutually exclusive with content. | |
| format | No | Format hint for parsing | auto |
| replace | No | Replace all existing mocks (true) or merge with existing (false) |