rest-api-controller-gen

Generate ASP.NET Core CRUD controllers with MediatR, FluentValidation, and OpenAPI annotations.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/nist0/CoDev --skill rest-api-controller-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rest-api-controller-gen
Source: https://github.com/nist0/CoDev/tree/main/.github/skills/rest-api-controller-gen
Command: npx skills add https://github.com/nist0/CoDev --skill rest-api-controller-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the problem of manually creating complex ASP.NET Core REST API controllers by automating the generation process from descriptions, OpenAPI contracts, or resource themes.

Core Features & Use Cases

  • Code Generation: Automatically generates DTOs, FluentValidation validators, MediatR commands/queries, and controllers based on input descriptions or OpenAPI contracts.
  • Multiple Input Modes: Supports natural-language descriptions, OpenAPI JSON contracts, or resource names/themes.
  • Integration with ASP.NET Core: Generates controllers that are compatible with the MediatR, ProblemDetails, FluentValidation, and OpenAPI annotations ecosystems.

Quick Start

Generate a REST API controller by running the command: codev rest-api-controller-gen --input-mode description [resource-description]

Frequently Asked Questions about rest-api-controller-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate ASP.NET Core CRUD controllers from an OpenAPI contract?

You can generate ASP.NET Core CRUD controllers by providing an OpenAPI JSON contract as the input mode. The tool automatically reads the contract to produce production-ready controllers, DTOs, and validators.

Can I generate MediatR commands and FluentValidation validators automatically?

Yes, you can automatically generate MediatR commands, queries, and FluentValidation validators. The tool integrates these patterns directly into the output controllers based on your resource descriptions or OpenAPI contracts.

What is the best way to scaffold a REST API controller using a natural language description?

The best way to scaffold a REST API controller from a description is using the description input mode. You provide a natural-language resource description, and the tool generates the controller, DTOs, and MediatR handlers.

Does the generated controller code include OpenAPI annotations and ProblemDetails?

Yes, the generated controller code includes OpenAPI annotations and integrates with ProblemDetails. This ensures the generated REST APIs are production-ready and compatible with the ASP.NET Core ecosystem.

What input modes are supported for generating ASP.NET Core controllers?

The supported input modes for generating ASP.NET Core controllers are natural-language descriptions, OpenAPI JSON contracts, or resource names and themes. Each mode produces fully structured controllers and associated validation logic.