add-openapi-codegen

Community

Generate type-safe APIs from your OpenAPI spec

Authordprice-dev
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-openapi-codegen
Download link: https://github.com/dprice-dev/claude-java-skills/archive/main.zip#add-openapi-codegen

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.