What problem does it solve?
This Skill solves the problem of keeping a Spring Boot REST contract and its generated Java API/DTO types synchronized, without manually editing controllers or models whenever the HTTP contract changes.
Core Features & Use Cases
- Spec-first OpenAPI Generator integration: pins and applies the OpenAPI Generator plugin, validates
src/main/resources/openapi/api.yaml, and regenerates code on rebuild.
- Spring Boot 4 + Jackson 3 compatible output: configures generator options to target Spring Boot 4 and Jackson 3 while generating interface-only API contracts split by tags.
- Build + compile wiring: adds generated sources to
main and establishes openApiValidate → openApiGenerate → compileJava dependencies for deterministic behavior.
- Quality gates that ignore generated code: excludes generated
api/** and dto/** from JaCoCo (and PIT, if present) so coverage/mutation metrics reflect hand-written code.
- Seed spec setup: creates a starter
api.yaml with paths: {} so the project builds and generation starts once endpoints are added.
Quick Start
Run add-openapi-codegen on your existing Spring Boot 4 project to validate and generate code from src/main/resources/openapi/api.yaml.