api-route-design

Design RESTful API endpoints with Pydantic validation and OpenAPI schemas.

Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Awais68/h2_phase_3_Chatbot_Todo --skill api-route-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-route-design
Source: https://github.com/Awais68/h2_phase_3_Chatbot_Todo/tree/main/.claude/skills/api-route-design
Command: npx skills add https://github.com/Awais68/h2_phase_3_Chatbot_Todo --skill api-route-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers design consistent, well-structured RESTful API endpoints in FastAPI or Python projects, ensuring correct validation, serialization, and HTTP semantics.

Core Features & Use Cases

  • Endpoint patterns: Implement common REST patterns like GET, POST, PUT, PATCH, and DELETE with clear path naming and proper status codes.
  • Validation & Schemas: Use Pydantic models to validate requests and define response schemas for OpenAPI documentation.
  • HTTP Semantics: Enforce correct use of HTTP methods, status codes, and error handling (e.g., 200, 201, 204, 404, 422).
  • Pagination, Filtering, Sorting: Provide standardized patterns for listing resources with skip/limit, filters, and sort orders.
  • Use Case: Design endpoints for a resource like /v1/users with CRUD operations and documented contracts.

Quick Start

Design a new REST resource at /v1/items with GET and POST endpoints using FastAPI, Pydantic models for input and output, and OpenAPI-conformant schemas.

Frequently Asked Questions about api-route-design

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

FAQPage Schema
How do I design REST API endpoints in FastAPI with proper validation and schemas?

Design REST API endpoints in FastAPI by structuring CRUD operations with clear path naming and using Pydantic models to validate requests and define response schemas for OpenAPI documentation.

What HTTP status codes should I use for POST, PUT, PATCH, and DELETE operations in a RESTful API?

Enforce correct HTTP semantics for RESTful APIs by selecting precise status codes, utilizing 201 for creation, 204 for successful deletion, 404 for missing resources, and 422 for validation errors.

How do I implement pagination, filtering, and sorting for listing resources in a Python REST API?

Implement pagination, filtering, and sorting for listing resources in a Python REST API by applying standardized patterns for skip/limit offsets, query parameter filters, and sort orders.

Can I use Pydantic models to validate request data and generate OpenAPI-compatible schemas for Python endpoints?

You can use Pydantic models to validate request data and generate OpenAPI-compatible schemas for Python endpoints, ensuring consistent serialization and documented contracts for real-world services.

What is the best way to structure RESTful resource naming and endpoint paths in a Python service?

The best way to structure RESTful resource naming in a Python service is to enforce clear endpoint path conventions like /v1/users, applying consistent naming and HTTP methods across CRUD operations.