Try Live
Add Docs
Rankings
Pricing
Docs
Install
Theme
Install
Docs
Pricing
More...
More...
Try Live
Rankings
Enterprise
Create API Key
Add Docs
Mokapi
https://github.com/marle3003/mokapi
Admin
Mokapi is an open-source API mocking tool that lets you develop and test without waiting for
...
Tokens:
80,147
Snippets:
928
Trust Score:
7.5
Update:
3 weeks ago
Context
Skills
Chat
Benchmark
82.4
Suggestions
Latest
Show doc for...
Code
Info
Show Results
Context Summary (auto-generated)
Raw
Copy
Link
# Mokapi Mokapi is an open-source API mocking tool that enables developers to simulate REST APIs, Kafka topics, LDAP directories, and SMTP servers using OpenAPI and AsyncAPI specifications. It allows frontend developers, QA teams, and DevOps engineers to develop and test applications without waiting for backend services or managing complex infrastructure dependencies. The tool operates on a specification-driven approach where API contracts serve as the source of truth for generating realistic mock responses. Mokapi supports dynamic behavior customization through embedded JavaScript, configuration patching for testing different scenarios, and provides a built-in dashboard for real-time request monitoring. It can load specifications from local files, HTTP URLs, Git repositories, or NPM packages, making it highly flexible for various development workflows. ## Installation Install Mokapi using NPM, Homebrew, Chocolatey, or Docker. ```bash # NPM (cross-platform) npm install -g go-mokapi # macOS with Homebrew brew tap marle3003/tap brew install mokapi # Windows with Chocolatey choco install mokapi # Docker docker pull mokapi/mokapi # Try instantly without installation npx go-mokapi https://petstore3.swagger.io/api/v3/openapi.json ``` ## Quick Start - Mock HTTP API Start a mock server from any OpenAPI specification URL or local file. ```bash # Start Mokapi with remote OpenAPI specification mokapi https://petstore3.swagger.io/api/v3/openapi.json # Start with local specification file mokapi /path/to/your/openapi.yaml # Start with environment variable MOKAPI_PROVIDERS_HTTP_URL=https://petstore3.swagger.io/api/v3/openapi.json mokapi # Start with Docker docker run -it --rm -p 80:80 -p 8080:8080 \ -e MOKAPI_Providers_Http_Url=https://petstore3.swagger.io/api/v3/openapi.json \ mokapi/mokapi:latest ``` ## Test Mock HTTP API with curl Send requests to the mock API and receive dynamically generated responses. ```bash # GET request with Accept header curl --header "Accept: application/json" http://localhost/api/v3/pet/4 # Response example (randomly generated based on schema): # { # "id": 10, # "name": "Waldo", # "category": { "id": 1, "name": "Dogs" }, # "photoUrls": ["http://example.com/photo"], # "tags": [{ "id": 7100881306113605000, "name": "WPMazgdHUX" }], # "status": "pending" # } # POST request curl -X POST http://localhost/api/v3/pet \ -H "Content-Type: application/json" \ -d '{"name": "Fluffy", "photoUrls": []}' # View dashboard at http://localhost:8080 ``` ## JavaScript Event Handler - on() Register event handlers to customize HTTP responses dynamically using the `on()` function. ```javascript // petstore.js - Custom response handler import { on } from 'mokapi' export default function() { on('http', (request, response) => { // Return custom data for specific pet ID if (request.key === '/pet/{petId}' && request.path.petId === 12) { response.data = { id: 12, name: 'Garfield', category: { id: 3, name: 'Cats' }, photoUrls: [], status: 'available' } return } // Return 404 for pet ID 999 if (request.path.petId === 999) { response.statusCode = 404 return } // Modify only specific fields of auto-generated response if (request.path.petId === 10) { response.data.name = 'Custom Pet Name' } }) } // Run: mokapi https://petstore3.swagger.io/api/v3/openapi.json ./petstore.js ``` ## JavaScript Event Handler - Simulating Delays and Errors Use `sleep()` to simulate network latency and test error handling scenarios. ```javascript // simulate-delays.js import { on, sleep } from 'mokapi' export default function() { on('http', (request, response) => { // Simulate slow response (5 seconds delay) if (request.query.slow === 'true') { sleep('5s') } // Simulate timeout for specific endpoint if (request.key === '/slow-endpoint') { sleep('30s') } // Simulate server error if (request.path.petId === 500) { response.statusCode = 500 response.data = { error: 'Internal Server Error' } } // Simulate rate limiting if (request.header['X-Rate-Limited'] === 'true') { response.statusCode = 429 response.headers['Retry-After'] = '60' } }) } ``` ## JavaScript Event Handler - Stateful Interactions Create stateful mock APIs that remember created resources across requests. ```javascript // stateful-api.js import { on } from 'mokapi' let createdPets = new Map() export default function() { on('http', (request, response) => { // Handle POST /pet (create) if (request.key === '/pet' && request.method === 'POST') { const newPet = request.body createdPets.set(newPet.id, newPet) response.statusCode = 201 response.data = newPet return } // Handle GET /pet/{petId} (retrieve created pet) if (request.key === '/pet/{petId}' && request.method === 'GET') { const petId = request.path.petId if (createdPets.has(petId)) { response.data = createdPets.get(petId) } } // Handle DELETE /pet/{petId} if (request.key === '/pet/{petId}' && request.method === 'DELETE') { createdPets.delete(request.path.petId) response.statusCode = 204 } }) } ``` ## HttpRequest Object Properties Access request data in HTTP event handlers through the HttpRequest object. ```javascript // request-properties.js import { on } from 'mokapi' export default function() { on('http', (request, response) => { // Available request properties: console.log(request.method) // "GET", "POST", "PUT", etc. console.log(request.key) // OpenAPI path pattern: "/pet/{petId}" console.log(request.operationId) // "getPetById" from OpenAPI spec console.log(request.url.path) // Actual URL path: "/api/v3/pet/12" console.log(request.api) // API name from OpenAPI info.title // Path parameters (from URL path) console.log(request.path.petId) // 12 (typed based on OpenAPI spec) // Query parameters console.log(request.query.status) // "available" // Headers console.log(request.header['Authorization']) console.log(request.header['Content-Type']) // Cookies console.log(request.cookie['session_id']) // Request body (parsed according to OpenAPI schema) console.log(request.body) console.log(request.body.name) }) } ``` ## HttpResponse - rebuild() Method Use `rebuild()` to switch to a different OpenAPI response definition safely. ```javascript // response-rebuild.js import { on } from 'mokapi' export default function() { on('http', (request, response) => { if (request.key === '/pet/{petId}') { // Rebuild response for 404 status code if (request.path.petId === 999) { response.rebuild(404, 'application/json') response.data.message = 'Pet not found' return } // Rebuild for different content type if (request.query.format === 'xml') { response.rebuild(200, 'application/xml') } } // Set custom headers response.headers['X-Custom-Header'] = 'custom-value' // Use raw body (bypasses OpenAPI encoding) if (request.query.raw === 'true') { response.body = '{"raw": "response"}' } }) } ``` ## Scheduled Jobs - every() and cron() Schedule periodic jobs using interval strings or cron expressions. ```javascript // scheduled-jobs.js import { every, cron } from 'mokapi' import { produce } from 'mokapi/kafka' export default function() { // Run every 30 seconds every('30s', function() { console.log('Running periodic task') }) // Run every 5 minutes every('5m', function() { // Publish Kafka message periodically produce({ topic: 'heartbeat', messages: [{ key: 'status', value: 'alive' }] }) }) // Run at specific cron schedule (every minute) cron('* * * * *', function() { console.log('Cron job executed') }) // Run daily at 9 AM cron('0 9 * * *', function() { console.log('Daily report generated') }) // Run every Monday at 9 AM cron('0 9 * * 1', function() { console.log('Weekly task executed') }) } ``` ## Fake Data Generation - fake() Generate realistic mock data based on OpenAPI schemas using the faker module. ```javascript // fake-data.js import { fake } from 'mokapi/faker' import { on } from 'mokapi' export default function() { // Generate basic types console.log(fake({ type: 'string' })) // Random string console.log(fake({ type: 'number' })) // Random number console.log(fake({ type: 'integer' })) // Random integer console.log(fake({ type: 'boolean' })) // true or false // Generate formatted strings console.log(fake({ type: 'string', format: 'email' })) // user@example.com console.log(fake({ type: 'string', format: 'uuid' })) // UUID console.log(fake({ type: 'string', format: 'date-time' })) // ISO date console.log(fake({ type: 'string', format: 'uri' })) // URL console.log(fake({ type: 'string', format: 'ipv4' })) // IP address // Generate with pattern console.log(fake({ type: 'string', pattern: '^\\d{3}-\\d{2}-\\d{4}$' })) // 123-45-6789 // Generate complex objects const user = fake({ type: 'object', properties: { id: { type: 'integer' }, name: { type: 'string', format: '{firstname} {lastname}' }, email: { type: 'string', format: 'email' }, age: { type: 'integer', minimum: 18, maximum: 65 } } }) console.log(user) on('http', (request, response) => { // Generate array of users response.data = fake({ type: 'array', items: { type: 'object', properties: { id: { type: 'integer' }, username: { type: 'string', format: '{username}' } } }, minItems: 5, maxItems: 10 }) }) } ``` ## HTTP Client - fetch() and HTTP Methods Make HTTP requests from within Mokapi scripts to external services. ```javascript // http-client.js import { fetch, get, post, put } from 'mokapi/http' import { on } from 'mokapi' export default async function() { // Using fetch (Promise-based) const response = await fetch('https://api.example.com/data', { method: 'POST', body: { key: 'value' }, headers: { 'Content-Type': 'application/json' } }) console.log(response.json()) // Using convenience methods const getRes = get('https://api.example.com/users') console.log(getRes.body) const postRes = post('https://api.example.com/users', { name: 'John' }, { headers: { 'Authorization': 'Bearer token123' } } ) // Forward requests to real backend conditionally on('http', async (request, response) => { if (request.header['X-Use-Real-Backend'] === 'true') { const realResponse = await fetch(`https://real-api.com${request.url.path}`) response.data = realResponse.json() } }) } ``` ## Kafka Mocking with AsyncAPI Mock Kafka topics using AsyncAPI specifications for event-driven architecture testing. ```yaml # asyncapi.yaml - Define Kafka topics asyncapi: '2.6.0' info: title: Orders Kafka Service version: 1.0.0 servers: mokapi: url: localhost:9092 protocol: kafka channels: orders: description: Kafka topic for order messages publish: message: $ref: '#/components/messages/Order' subscribe: message: $ref: '#/components/messages/Order' components: messages: Order: name: OrderMessage payload: type: object properties: orderId: type: string customerId: type: string totalAmount: type: number format: float items: type: array items: type: object properties: productId: type: string quantity: type: integer required: - orderId ``` ```bash # Start Kafka mock mokapi asyncapi.yaml ``` ## Kafka Producer - produce() Publish messages to Kafka topics from JavaScript scripts. ```javascript // kafka-producer.js import { produce } from 'mokapi/kafka' import { every } from 'mokapi' export default function() { // Produce single message const result = produce({ topic: 'orders', messages: [ { key: 'order-1', value: JSON.stringify({ orderId: '12345', customerId: '0001' }) } ] }) console.log(`Offset: ${result.messages[0].offset}`) // Produce multiple messages produce({ topic: 'orders', messages: [ { key: 'order-1', value: 'message 1' }, { key: 'order-2', value: 'message 2' } ] }) // Produce with specific partition produce({ topic: 'orders', messages: [ { key: 'key1', value: 'hello', partition: 0 }, { key: 'key2', value: 'world', partition: 1 } ] }) // Produce with data (validated against schema) produce({ topic: 'orders', messages: [{ key: 'order-123', data: { orderId: '123', customerId: 'cust-456', totalAmount: 99.99, items: [{ productId: 'prod-1', quantity: 2 }] }, headers: { 'system-id': 'my-producer', 'message-type': 'new-order' } }] }) // Periodic message production every('10s', function() { produce({ topic: 'heartbeat', messages: [{ key: 'status', value: 'alive' }] }) }) } ``` ## Kafka Consumer Example (C#) Connect to Mokapi's Kafka mock server using standard Kafka clients. ```csharp // Producer using Confluent.Kafka; using System.Text.Json; var producerConfig = new ProducerConfig { BootstrapServers = "localhost:9092" }; using var producer = new ProducerBuilder<string, string>(producerConfig).Build(); var order = new { OrderId = "12345", CustomerId = "0001", TotalAmount = 250.75F, Items = new[] { new { ProductId = "101", Quantity = 2 }, new { ProductId = "102", Quantity = 1 } } }; await producer.ProduceAsync("orders", new Message<string, string> { Key = "foo", Value = JsonSerializer.Serialize(order) }); // Consumer var consumerConfig = new ConsumerConfig { BootstrapServers = "localhost:9092", GroupId = "my-consumer-group", AutoOffsetReset = AutoOffsetReset.Earliest }; using var consumer = new ConsumerBuilder<Ignore, string>(consumerConfig).Build(); consumer.Subscribe("orders"); while (true) { var result = consumer.Consume(); Console.WriteLine($"Message: {result.Message.Value}"); } ``` ## LDAP Server Mocking Mock LDAP directories for testing authentication and directory queries. ```yaml # ldap.yaml - LDAP server configuration ldap: '1.0' host: :389 files: - ./entries.ldif ``` ```ldif # entries.ldif - Define LDAP entries # Root DSE dn: namingContexts: dc=example,dc=com dn: dc=example,dc=com objectClass: top dn: ou=users,dc=example,dc=com objectClass: organizationalUnit ou: users dn: cn=alice,ou=users,dc=example,dc=com objectClass: inetOrgPerson cn: alice sn: Smith mail: alice@example.com userPassword: secret123 dn: cn=bob,ou=users,dc=example,dc=com objectClass: inetOrgPerson cn: bob sn: Jones mail: bob@example.com userPassword: password456 ``` ```bash # Start LDAP mock server mokapi ldap.yaml # Query LDAP entries ldapsearch -x -h localhost -p 389 -b "dc=example,dc=com" "(objectClass=*)" # Search for specific user ldapsearch -x -h localhost -p 389 -b "dc=example,dc=com" "(cn=alice)" # Authenticate user ldapsearch -x -h localhost -p 389 -D "cn=alice,ou=users,dc=example,dc=com" \ -w secret123 -b "dc=example,dc=com" "(cn=alice)" ``` ## SMTP Server Mocking Mock SMTP servers to test email sending without delivering real messages. ```yaml # smtp.yaml - SMTP server configuration mail: '1.0' info: title: Test Mail Server servers: smtp: host: localhost:25 protocol: smtp ``` ```bash # Start SMTP mock server mokapi smtp.yaml # View sent emails at http://localhost:8080 (dashboard) ``` ```csharp // Send test email (C#) using System.Net.Mail; var message = new MailMessage( from: "sender@example.com", to: "recipient@example.com", subject: "Test Email", body: "This is a test email sent to Mokapi's mock SMTP server." ); using var client = new SmtpClient("127.0.0.1", 25); client.Send(message); ``` ```javascript // Send email from Node.js const nodemailer = require('nodemailer'); const transporter = nodemailer.createTransport({ host: 'localhost', port: 25, secure: false }); await transporter.sendMail({ from: 'sender@example.com', to: 'recipient@example.com', subject: 'Test Email', text: 'This is a test email.' }); ``` ## Configuration Patching Override parts of API specifications without modifying original files. ```yaml # original-petstore.yaml (from external source) openapi: 3.0.3 info: title: Swagger Petstore - OpenAPI 3.0 servers: - url: https://petstore3.swagger.io/api/v3 ``` ```yaml # petstore-patch.yaml (local overrides) openapi: 3.0.3 info: title: Swagger Petstore - OpenAPI 3.0 servers: - url: http://localhost/petstore # Add local server ``` ```bash # Run with patch - both servers will be available mokapi https://petstore3.swagger.io/api/v3/openapi.json ./petstore-patch.yaml # Result: API available at both original URL and localhost/petstore ``` ## File Provider Configuration Load specifications from local files and directories. ```yaml # mokapi.yaml - Static configuration providers: file: directory: /path/to/specs include: - "*.yaml" - "*.json" exclude: - "debug.json" skipPrefix: - "_" ``` ```bash # CLI options mokapi --providers-file-directory /path/to/specs mokapi --providers-file-filename openapi.yaml mokapi --providers-file-include "*.yaml" "*.json" # Environment variables MOKAPI_PROVIDERS_FILE_DIRECTORY=/path/to/specs mokapi ``` ## HTTP Provider Configuration Load specifications from remote URLs with polling support. ```yaml # mokapi.yaml providers: http: url: https://api.example.com/openapi.json urls: - https://api.example.com/spec1.yaml - https://api.example.com/spec2.yaml pollInterval: 5m pollTimeout: 10s proxy: http://proxy.server.com:8080 tlsSkipVerify: false ``` ```bash # CLI options mokapi --providers-http-url https://api.example.com/openapi.json mokapi --providers-http-poll-interval 10s mokapi --providers-http-tls-skip-verify mokapi --providers-http-proxy http://proxy:8080 ``` ## Git Provider Configuration Load specifications directly from Git repositories. ```yaml # mokapi.yaml providers: git: url: https://github.com/user/api-specs.git pullInterval: 5m tempDir: /tmp/mokapi-git ``` ```bash # CLI options mokapi git+https://github.com/user/api-specs.git mokapi --providers-git-url https://github.com/user/api-specs.git mokapi --providers-git-pull-interval 10m ``` ## OpenAPI Security Schemes Mock authentication schemes including Basic Auth, Bearer tokens, OAuth2, and API keys. ```yaml # openapi-with-security.yaml openapi: 3.0.3 info: title: Secured API version: 1.0.0 servers: - url: http://localhost/api components: securitySchemes: basicAuth: type: http scheme: basic bearerAuth: type: http scheme: bearer apiKeyHeader: type: apiKey in: header name: X-API-Key apiKeyQuery: type: apiKey in: query name: api_key security: - bearerAuth: [] paths: /protected: get: security: - apiKeyHeader: [] responses: '200': description: Success ``` ```javascript // Validate authentication in script import { on } from 'mokapi' export default function() { on('http', (request, response) => { // Access authentication headers const authHeader = request.header['Authorization'] const apiKey = request.header['X-API-Key'] // Custom validation logic if (apiKey !== 'valid-api-key') { response.statusCode = 401 response.data = { error: 'Invalid API key' } } }) } ``` ## Declarative Test Data Generation Generate realistic test data using format placeholders in OpenAPI schemas. ```yaml # openapi-with-formats.yaml openapi: 3.0.3 info: title: User API version: 1.0.0 paths: /users: get: responses: '200': content: application/json: schema: type: array items: type: object properties: id: type: string format: uuid name: type: string format: "{firstname} {lastname}" email: type: string format: email ssn: type: string pattern: '^\d{3}-\d{2}-\d{4}$' city: type: string format: "{city}" company: type: string format: "{appname}" ``` ```bash # Generate test data via API endpoint curl -X POST http://localhost:8080/api/schema/example \ -H 'Content-Type: application/json' \ -d '{"type":"string","format":"email"}' # Supported format placeholders: # Person: {name}, {firstname}, {lastname}, {email}, {gender} # Auth: {username}, {password} # Address: {street}, {city}, {state}, {zip}, {country} # Internet: {url}, {domainname}, {ipv4address}, {ipv6address} # Date/Time: {date}, {year}, {month}, {weekday} # Numbers: {number:min,max}, {int32}, {float64} # Misc: {uuid}, {bool}, {color}, {emoji} ``` ## Environment Variables and File Access Access environment variables and files from within Mokapi scripts. ```javascript // environment-and-files.js import { env } from 'mokapi' import { read, writeString, appendString } from 'mokapi/file' import { on } from 'mokapi' export default function() { // Access environment variables const apiKey = env('API_KEY') const dbHost = env('DATABASE_HOST') console.log(`API Key: ${apiKey}`) // Read file contents const configData = read('./config.json') const config = JSON.parse(configData) // Write to file writeString('./output.log', 'Log entry\n') // Append to file appendString('./output.log', 'Another entry\n') // Use in event handler on('http', (request, response) => { // Log requests to file const logEntry = JSON.stringify({ timestamp: new Date().toISOString(), method: request.method, path: request.url.path }) appendString('./requests.log', logEntry + '\n') // Use config values response.headers['X-Environment'] = env('ENVIRONMENT') || 'development' }) } ``` ```bash # Run with environment variables API_KEY=secret123 ENVIRONMENT=staging mokapi openapi.yaml ./script.js ``` ## YAML and Mustache Template Processing Parse YAML data and render Mustache templates in scripts. ```javascript // yaml-and-templates.js import { parse, stringify } from 'mokapi/yaml' import { render } from 'mokapi/mustache' import { on } from 'mokapi' export default function() { // Parse YAML string const yamlString = ` name: John Doe age: 30 roles: - admin - user ` const data = parse(yamlString) console.log(data.name) // "John Doe" console.log(data.roles) // ["admin", "user"] // Convert object to YAML const obj = { key: 'value', nested: { a: 1 } } const yaml = stringify(obj) console.log(yaml) // Render Mustache templates const template = 'Hello {{name}}! You have {{count}} messages.' const rendered = render(template, { name: 'Alice', count: 5 }) console.log(rendered) // "Hello Alice! You have 5 messages." on('http', (request, response) => { // Dynamic template response const emailTemplate = ` Dear {{name}}, Your order #{{orderId}} has been confirmed. Total: ${{total}} ` response.body = render(emailTemplate, { name: request.body.customerName, orderId: request.body.orderId, total: request.body.total }) response.headers['Content-Type'] = 'text/plain' }) } ``` ## Base64 Encoding and Decoding Encode and decode Base64 data in scripts. ```javascript // base64-encoding.js import { base64 } from 'mokapi/encoding' import { on } from 'mokapi' export default function() { // Encode string to Base64 const encoded = base64.encode('Hello, World!') console.log(encoded) // "SGVsbG8sIFdvcmxkIQ==" // Decode Base64 string const decoded = base64.decode('SGVsbG8sIFdvcmxkIQ==') console.log(decoded) // "Hello, World!" on('http', (request, response) => { // Decode Base64 request body if (request.header['Content-Encoding'] === 'base64') { const decodedBody = base64.decode(request.body) console.log('Decoded body:', decodedBody) } // Encode response as Base64 if (request.query.encoding === 'base64') { response.body = base64.encode(JSON.stringify(response.data)) response.headers['Content-Encoding'] = 'base64' } }) } ``` ## CLI Reference Complete reference for Mokapi command-line options. ```bash # Basic usage mokapi [OPTIONS] [config-url|directory|file] # Logging mokapi --log-level debug # debug, info, warn, error mokapi --log-format json # json or text # API and Dashboard mokapi --api-port 9000 # Dashboard port (default: 8080) mokapi --api-dashboard false # Disable dashboard mokapi --api-no-dashboard # Disable dashboard (shorthand) mokapi --api-path /mokapi # Dashboard path prefix mokapi --api-base /mokapi/dashboard # Dashboard base URL (for reverse proxy) # File provider mokapi --providers-file-filename spec.yaml mokapi --providers-file-directory ./specs mokapi --providers-file-include "*.yaml" "*.json" # HTTP provider mokapi --providers-http-url https://example.com/spec.yaml mokapi --providers-http-poll-interval 5m mokapi --providers-http-tls-skip-verify mokapi --providers-http-proxy http://proxy:8080 # Git provider mokapi --providers-git-url https://github.com/user/repo.git mokapi --providers-git-pull-interval 10m # Data generation mokapi --data-gen-optionalProperties sometimes # always, often, sometimes, rarely # Event store size mokapi --event-store-default-size 200 # Max events per API (default: 100) # TLS certificates mokapi --rootCaCert /path/to/ca.pem mokapi --rootCaKey /path/to/ca-key.pem # Environment variables (alternative to CLI) MOKAPI_LOG_LEVEL=debug MOKAPI_API_PORT=9000 MOKAPI_PROVIDERS_FILE_DIRECTORY=/specs MOKAPI_PROVIDERS_HTTP_URL=https://example.com/spec.yaml ``` ## Summary Mokapi serves as a comprehensive API mocking solution for modern development workflows, enabling teams to work independently of backend availability while maintaining strict API contract compliance. Its primary use cases include frontend development with mock backends, integration testing in CI/CD pipelines, API contract validation, and simulating edge cases like timeouts, errors, and authentication failures. The tool supports multiple protocols (HTTP, Kafka, LDAP, SMTP) through a unified interface, making it ideal for microservices architectures and event-driven systems. Integration patterns typically involve loading OpenAPI or AsyncAPI specifications from various sources (files, URLs, Git repos) and optionally enhancing them with JavaScript event handlers for dynamic behavior. Mokapi fits naturally into development workflows through Docker containers for CI/CD, NPM packages for frontend projects, or standalone binaries for local development. The configuration patching mechanism allows teams to maintain environment-specific overrides without modifying shared API specifications, while the built-in dashboard provides real-time visibility into mock server activity for debugging and validation.