spring-mvc-webflux-api-builder

Generate Kotlin Spring MVC/WebFlux controllers, DTOs, validation, and tests from endpoint contracts.

14|1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill spring-mvc-webflux-api-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-mvc-webflux-api-builder
Source: https://github.com/Kotlin/kotlin-backend-agent-skills/tree/main/.agents/skills/spring-mvc-webflux-api-builder
Command: npx skills add https://github.com/Kotlin/kotlin-backend-agent-skills --skill spring-mvc-webflux-api-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing and evolving Spring MVC/WebFlux endpoints in Kotlin is error-prone and repetitive. This skill provides a contract-first approach to ensure correct controllers, DTO boundaries, validation, serialization assumptions, and test scaffolding. It helps teams standardize error handling and avoid Kotlin/Jackson pitfalls.

Core Features & Use Cases

  • Contract-driven API design for Kotlin Spring endpoints (MVC or WebFlux) with explicit request/response boundaries.
  • Automated DTO generation, proper use of @field: validation annotations, and consistent error models and exception mappings.
  • Web-layer scaffolding and test stubs that verify endpoint contracts and serialization behavior across the repo's Spring stack.

Quick Start

Define an endpoint contract and run the builder to generate controllers, DTOs, validation, error handling, and tests.

Frequently Asked Questions about spring-mvc-webflux-api-builder

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

FAQPage Schema
How do I generate Kotlin Spring Boot controllers and DTOs with proper validation?

To generate Kotlin Spring Boot controllers and DTOs, define an endpoint contract and run the builder to automate controller creation, DTO boundaries, @field: validation annotations, and consistent error models across your project.

What is the best way to handle validation and error models consistently in Spring MVC and WebFlux?

The best way to handle validation and error models in Spring MVC and WebFlux is using a contract-first approach that respects existing project conventions, ensuring consistent exception mappings and avoiding Kotlin and Jackson serialization pitfalls.

Can I use this approach for both Spring MVC and WebFlux stacks in the same project?

Yes, you can use this approach for both Spring MVC and WebFlux stacks, as the builder ensures compatibility with the repository's Spring stack by respecting project conventions and existing error models across both reactive and blocking endpoints.

Why does Jackson serialization fail with Kotlin DTOs in Spring Boot and how can I avoid it?

Jackson serialization fails with Kotlin DTOs when validation annotations are applied incorrectly, but this contract-driven API builder avoids those Kotlin and Jackson pitfalls by enforcing proper @field: validation annotation usage and explicit request and response boundaries.

How do I scaffold tests for Spring API endpoint contracts and serialization behavior?

Scaffold tests for Spring API endpoint contracts by defining the endpoint contract first, which generates web-layer test stubs that verify endpoint contracts and serialization behavior across the repository's Spring stack.