Dotnetify is a CLI tool that transforms an OpenAPI / Swagger specification into a fully generated ASP.NET Core server project.
Instead of producing raw generator output, Dotnetify builds a structured, launch-ready backend scaffold that can be compiled, started, and extended immediately.
It is designed for developers who need a fast backend starting point from an existing API schema.
Important
Dotnetify focuses on producing a usable server project, not just generated source files.
Input:
swagger.json
Pipeline:
OpenAPI Spec
β
Code Generation
β
Roslyn Processing
β
Project Structuring
β
Runnable .NET Backend
Output:
ProjectName/
βββ Controllers/
βββ Models/
βββ Enums/
βββ Common/
βββ Program.cs
βββ ProjectName.csproj
By default, ProjectName is GeneratedApi. You can override it with --name.
| Category | Description |
|---|---|
| OpenAPI Import | Reads swagger.json specifications |
| Controllers | Generates API controllers by route groups |
| Models | Generates DTO / entity classes |
| Enums | Generates enums from schema definitions |
| Mock Responses | Auto-generates test responses for endpoints |
| Build Ready | Produces compilable .NET project |
| Run Ready | Can start generated API instantly |
| Swagger UI | Generated server exposes Swagger portal |
| Custom Name | Generates project folders and files with a custom project name |
| Custom Port | Runs generated API on a selected HTTP port with --port |
| Roslyn Processing | Cleans and restructures generated code |
Most generators stop here:
swagger.json β raw generated code
Dotnetify continues further:
swagger.json β working backend project
That means:
- Faster frontend development
- Faster prototyping
- Easier API testing
- Better reverse engineering workflows
- Immediate backend starting point
Go to the compiled binary:
cd app\Dotnetify\bin\Debug\net8.0Generate and run:
Dotnetify.exe generate Input\swagger.json --runGenerate with a custom project name:
Dotnetify.exe generate Input\swagger.json --name MyApiGenerate with a custom project name and run it immediately:
Dotnetify.exe generate Input\swagger.json --name MyApi --runGenerate, run, and bind the generated API to a custom HTTP port:
Dotnetify.exe generate Input\swagger.json --name MyApi --run --port 5103If --port is not provided, Dotnetify uses port 5000.
This creates:
Output/MyApi/MyApi.csproj
Example output:
[Dotnetify] Running: Roslyn Split Processor
[Dotnetify] Running: Dotnet Project Processor
[Dotnetify] Running: Package Resolve Processor
Generation complete.
Starting server...
Started PID: 29296
Swagger: http://localhost:5000/swagger
With a custom port:
Started PID: 29296
Swagger: http://localhost:5103/swagger
Need backend before real backend exists.
Generate local API from schema instantly.
Recreate documented APIs into editable .NET projects.
Launch backend prototype rapidly.
Generated controller:
[HttpGet("inventory")]
public Task<IDictionary<string, int>> GetInventory()
{
var response = new Dictionary<string, int>
{
{ "test", 1 }
};
return Task.FromResult<IDictionary<string, int>>(response);
}Dotnetify does not aim to replace real backend engineering.
It aims to eliminate the empty starting phase.
Instead of spending hours scaffolding:
- controllers
- DTOs
- routes
- startup boilerplate
- fake data
You start with all of it already generated.
Planned future improvements:
- Database scaffolding
- Repository generation
- React admin panel generation
- Authentication templates
- Docker support
- CI/CD templates
- Multiple architecture modes
Active development
Core generation pipeline is already functional and produces runnable projects.
- C#
- .NET
- ASP.NET Core
- Roslyn
- NSwag