Automatically generate enriched OpenAPI 3.0.3 documentation from raw C# ASP.NET Core controllers using local AI - no manual annotations required.
Paste any ASP.NET Core controller. AutoDoc reads the raw C# code and infers everything automatically:
- Routes and HTTP methods
- Operation IDs and summaries
- Request body schemas
- Response codes (200, 201, 400, 404, 500)
- Error schemas
- Live Swagger Preview
No [ProducesResponseType]. No [SwaggerOperation]. No XML comments. Just raw C# code.
| Phase | What it is |
|---|---|
| Phase 1 - Console App | Proof of concept, YAML printed to terminal |
| Phase 2 - Docker Web API | REST backend, callable via HTTP POST |
| Phase 3 - Playground UI | Browser dashboard, paste and generate instantly |
- .NET 10 SDK
- Ollama installed and running
- Llama 3.2 model pulled
ollama pull llama3.2# Clone the repo
git clone https://github.com/jmy744/AutoDoc
cd AutoDoc/autodoc-api
# Start Ollama (in a separate terminal)
ollama serve
# Run the API
dotnet runOpen your browser at http://localhost:5250
# Make sure Ollama is running on your machine first
ollama serve
# Build and run
cd AutoDoc/autodoc-api
docker build -t autodoc .
docker run -p 5250:5250 -e OLLAMA_HOST=http://host.docker.internal:11434 autodocOpen your browser at http://localhost:5250
- Open
http://localhost:5250 - The sample
TodoControlleris pre-filled — or paste your own - Click Generate OpenAPI Docs
- Switch between Raw YAML and Swagger Preview tabs
POST /generate-openapi
Content-Type: application/json
{
"controllerCode": "your C# controller code here",
"controllerName": "TodoController"
}Response:
{
"controllerName": "TodoController",
"yaml": "openapi: 3.0.3 ...",
"lines": 87,
"generationTime": "12 seconds"
}| Layer | Technology |
|---|---|
| Backend | ASP.NET Core 10 Minimal API |
| AI Model | Llama 3.2 via Ollama |
| Frontend | Vanilla HTML/CSS/JS |
| Swagger Render | Swagger UI 5 |
| Containerisation | Docker |
This project was built as part of the GitHub Finish-Up-A-Thon Challenge. GitHub Copilot was used throughout for the Docker API conversion, the Playground UI, and the YAML post-processing pipeline.
MIT