DEV Community

Cover image for Turn your code into OpenAPI 3.0 docs in seconds
Qodex
Qodex

Posted on

Turn your code into OpenAPI 3.0 docs in seconds

Introducing ApiMesh by qodex.ai

GitHub: https://github.com/qodex-ai/apimesh

Maintaining API documentation is slow and repetitive.

ApiMesh by qodex.ai makes it automatic.

It scans your codebase, detects all REST endpoints and instantly generates:

  • an OpenAPI 3.0 swagger.json
  • a complete interactive API documentation UI in apimesh-docs.html

No manual work. No outdated docs. No drift.

What ApiMesh Does

  • Scans your repository
  • Detects routes, parameters, auth and schemas
  • Generates accurate OpenAPI 3.0 documentation
  • Builds apimesh-docs.html powered by Swagger UI
  • Supports multiple languages and frameworks
  • Runs with zero configuration

You write the code. ApiMesh writes the docs.

Key Features

  • Smart code discovery that finds endpoints automatically
  • Clean and reliable OpenAPI 3.0 spec output
  • Fully interactive HTML documentation with try-it-out
  • One-command setup with no configuration required
  • Multi-language and multi-framework support
  • Self-contained HTML that works offline and can be shared easily

How ApiMesh Works

ApiMesh uses static analysis and AI intelligence to map out your API.

  1. Scans your repository
  2. Detects your framework
  3. Extracts routes, methods, schemas and examples
  4. Enriches context using embeddings
  5. Generates a complete OpenAPI 3.0 spec
  6. Renders a full interactive HTML API UI
  7. Optionally syncs to qodex.ai for automated API testing and security scans

Supported Languages and Frameworks

Python: FastAPI, Flask, Django, DRF

Node.js and TypeScript: Express, NestJS

Ruby: Ruby on Rails

Go: Gin, Fiber, Echo, Chi, Gorilla Mux, net/http

Others: Detected through AI heuristics

You can extend detection rules through config.yml.

Output Files

swagger.json – Complete OpenAPI 3.0 spec

apimesh-docs.html – Interactive API documentation UI

config.json – CLI configuration

config.yml – Custom scan rules

Open the HTML file in any browser or deploy it anywhere.

Quick Start (30 Seconds)

Option 1: Docker

cd /path/to/your/repo
docker run -it --rm -v $(pwd):/workspace qodexai/apimesh:latest
Enter fullscreen mode Exit fullscreen mode

Option 2: MCP

curl https://raw.githubusercontent.com/qodex-ai/apimesh/main/swagger_mcp.py -o swagger_mcp.py
Enter fullscreen mode Exit fullscreen mode

Add to MCP settings:

{
  "mcpServers": {
    "apimesh": {
      "command": "uv",
      "args": ["run", "/path/to/swagger_mcp/swagger_mcp.py"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Option 3: Curl Script

cd /path/to/your/repo
mkdir -p apimesh && \
curl -sSL https://raw.githubusercontent.com/qodex-ai/apimesh/refs/heads/main/run.sh -o apimesh/run.sh && \
chmod +x apimesh/run.sh && apimesh/run.sh
Enter fullscreen mode Exit fullscreen mode

Everything is created inside the apimesh folder.

Contributing

ApiMesh by qodex.ai is fully open source. Contributions are welcome.

  • Add support for more frameworks
  • Improve route or schema detection
  • Report issues
  • Submit pull requests

GitHub repo: https://github.com/qodex-ai/apimesh
qodex.ai

Top comments (0)