A desktop-first OpenAPI editor for YAML parsing, endpoint browsing, lint checks, and mock response preview.
- YAML Parsing: Uses
yamlto parse editable OpenAPI 3.1 documents. - Import & Validate: Loads YAML files and records validation status from contract checks.
- Endpoint Tree: Lists operations by method, path, summary, and response count.
- Method Filters & cURL: Filters operations by HTTP method and copies a ready cURL command.
- Contract Lint: Checks for version, info title, server URL, and operation responses.
- Mock Preview: Generates a lightweight JSON payload for the selected operation.
- Desktop-First Contract UI: Three-pane editor layout with mobile stacking and scrollable panes.
src/
|-- main.tsx
|-- app.tsx # YAML editor, endpoint explorer, lint panel, mock response
`-- index.css
- Preact 10 with Vite 8
- TypeScript 6
- Tailwind CSS 4
lucide-preactyaml
public/sample-openapi.yamlincludes a complete OpenAPI 3.1 contract.- Use the in-app Load sample action to repopulate the YAML editor and endpoint explorer.
npm install
npm run devOpen http://localhost:5173.
- This is a desktop-first tool because contract editors benefit from simultaneous code, navigation, and inspector panels.
- The current lint checks are intentionally lightweight; integrate Spectral for production-grade OpenAPI rules.
- Mock responses are deterministic placeholders and can be replaced with schema-driven generation.
npm run build
npm run previewThe repository includes a Vite-ready vercel.json with SPA rewrites.
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "dist",
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}MIT License. See LICENSE.