api-endpoint

Creates REST API endpoints with HTTP methods, validation, error handling, Swagger documentation, and JWT security.

Updated Sep 12, 2025
One-click install
npx skills add https://github.com/ammonsd/ActivityTracking --skill api-endpoint-ammonsd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoint
Source: https://github.com/ammonsd/ActivityTracking/tree/main/skills/api-endpoint
Command: npx skills add https://github.com/ammonsd/ActivityTracking --skill api-endpoint-ammonsd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to creating REST API endpoints that align with project conventions, ensuring consistent patterns, validation, error handling, and API documentation.

Core Features & Use Cases

  • Resource modeling and CRUD: Define DTOs and controllers that follow established conventions.
  • Validation and error handling: Leverage @Valid and a global exception handler to return meaningful HTTP status codes.
  • OpenAPI/Swagger documentation: Generate and annotate API docs for endpoints and models.
  • Security integration: Scaffold JWT-based authentication and authorization for API access.

Quick Start

Use the api-endpoint skill to generate a fully functional REST API endpoint for a sample resource, including Create, Read, Update, Delete operations, input validation, error handling, and Swagger documentation.

Frequently Asked Questions about api-endpoint

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

FAQPage Schema
How do I scaffold a REST API endpoint in Spring Boot with CRUD operations?

Scaffolding a REST API endpoint in Spring Boot involves defining resource DTOs and controllers that follow established conventions. This generates Create, Read, Update, Delete operations with proper HTTP methods, input validation, and centralized exception handling for meaningful HTTP status codes.

How does validation and error handling work for Spring Boot REST APIs?

Validation and error handling for Spring Boot REST APIs leverage the @Valid annotation to enforce input constraints and a global exception handler to catch errors. This mechanism returns meaningful HTTP status codes consistently across all endpoints.

What is the best way to generate OpenAPI and Swagger documentation for Spring Boot endpoints?

The best way to generate OpenAPI and Swagger documentation for Spring Boot endpoints is by annotating API docs for endpoints and models during scaffolding. This ensures the generated API documentation accurately describes REST resources and validation rules.

How do I integrate JWT security into a Spring Boot REST API?

Integrating JWT security into a Spring Boot REST API involves scaffolding JWT-based authentication and authorization for API access. This secures endpoints by applying standardized token validation within the Spring Boot backend configuration.

Can I use this REST API scaffolding approach for adding new resources to an existing Spring Boot backend?

Yes, this REST API scaffolding approach applies to adding new resources to an existing Spring Boot backend. It implements CRUD operations, validation, and Swagger documentation while following established project conventions without breaking existing patterns.