swagger-annotations

Inject missing Swagger/OpenAPI annotations into Spring Boot REST controllers.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/BNTang/Sa-Token-Demo --skill swagger-annotations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swagger-annotations
Source: https://github.com/BNTang/Sa-Token-Demo/tree/main/.claude/skills/swagger-annotations
Command: npx skills add https://github.com/BNTang/Sa-Token-Demo --skill swagger-annotations

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Swagger/Knife4j/OpenAPI annotation automation tool analyzes Spring Boot REST controllers and automatically injects missing Swagger metadata to ensure consistent API documentation across the codebase.

Core Features & Use Cases

  • Detects Swagger 2.x, OpenAPI 3.x, and Knife4j styles and generates appropriate class-level and method-level annotations.
  • Generates VO/DTO model annotations (ApiModel/Schema) and property descriptions to keep API documents in sync with code.
  • Provides migration guidance between versions and saves time during code reviews, onboarding, and documentation upgrades.

Quick Start

Activate the skill against a Spring Boot project; it will scan controllers, augment missing annotations, and propose diffs or apply updates to produce well-documented endpoints.

Frequently Asked Questions about swagger-annotations

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

FAQPage Schema
How do I automatically generate Swagger annotations for Spring Boot REST controllers?

To generate Swagger annotations for Spring Boot, activate this skill against your project to scan controllers and automatically inject missing class-level and method-level metadata, producing well-documented endpoints.

What is the best way to add OpenAPI 3.x documentation to existing VO and DTO models?

Adding OpenAPI 3.x documentation to VO and DTO models is handled by analyzing your code and automatically generating Schema and property descriptions to keep API documents synchronized with your codebase.

Does this annotation generation tool support Knife4j and Swagger 2.x projects?

Yes, this tool supports Swagger 2.x, OpenAPI 3.x, and Knife4j projects by detecting the specific style used and generating appropriate annotations according to your project conventions.

Can I migrate API documentation from Swagger 2.x to OpenAPI 3.x in Spring Boot?

You can migrate API documentation from Swagger 2.x to OpenAPI 3.x in Spring Boot using the built-in migration guidance, which updates annotations to match the detected target version conventions.

Do I need external network services to fill missing OpenAPI annotations?

You do not need external network services to fill missing OpenAPI annotations, as this skill operates entirely offline by analyzing code locally and adapting to the detected Swagger version.