← Back to Overview

MOCK SERVERS

Swagger / OpenAPI

Auto-generated OpenAPI 3.0 documentation and interactive Swagger UI from your mock server routes — no manual spec writing needed.

Swagger UI served from the mock server in the browser

Overview

Each mock server can auto-generate OpenAPI 3.0 documentation from its routes. No manual spec writing needed — derived directly from your route definitions.

Served at /_openapi.json (spec) and /_swagger (interactive UI)

Enabling

Toggle Swagger in mock server settings. When enabled:

Two special endpoints are added: /_openapi.json and /_swagger
View Swagger button appears in the UI to open the browser

Accessing

EndpointDescription
/_openapi.jsonRaw OpenAPI 3.0 JSON spec
/_swaggerInteractive Swagger UI (rendered in browser)
URL: http://localhost:{port}/_swagger — also accessible from the "View Swagger" button in mock server detail.

Generated Spec

The spec is generated from your routes — each route becomes a path + operation:

Method, path, status code, and response headers mapped
Response body example included if static body configured
Updates live as you add or modify routes

Interactive UI

Full Swagger UI with "Try it out" functionality:

Test your mock endpoints directly from the browser
Shows request/response examples
Useful for sharing with frontend developers or QA

Use Cases

Share mock API docs with frontend team
Verify mock routes match expected contract
Quick visual review of all configured endpoints
Generate client SDKs from the spec

Next

Ko-fi