api-designer

Design and implement REST API endpoints with FastAPI and Pydantic.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/ayia/NutriProfile --skill api-designer-ayia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-designer
Source: https://github.com/ayia/NutriProfile/tree/main/.claude/skills/api-designer
Command: npx skills add https://github.com/ayia/NutriProfile --skill api-designer-ayia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design and implement REST API endpoints for NutriProfile following FastAPI and Pydantic best practices to deliver clear interfaces and reliable OpenAPI contracts.

Core Features & Use Cases

  • End-to-end API design including endpoint scaffolding, data models, input validation, error handling, and OpenAPI documentation.
  • Schema evolution and versioning with Pydantic models and FastAPI routers to support iterative API changes across features like users, profiles, vision, and subscriptions.

Quick Start

Create a new FastAPI endpoint following the project's schemas and OpenAPI standards.

Frequently Asked Questions about api-designer

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

FAQPage Schema
How do I design FastAPI endpoints with Pydantic validation?

Designing FastAPI endpoints with Pydantic validation involves defining type-driven data models for inputs and outputs, which automatically enforce schemas and generate OpenAPI documentation. This approach ensures structured validation and clear API contracts.

What's the best way to document REST API endpoints using FastAPI?

The best way to document REST API endpoints using FastAPI is by leveraging Pydantic type hints and structured route definitions to auto-generate OpenAPI contracts. This provides clear, interactive documentation while enforcing consistent endpoint patterns across your application.

How does Pydantic handle schema evolution and API versioning in FastAPI?

Pydantic handles schema evolution and API versioning in FastAPI by allowing you to define distinct models and organize them within versioned FastAPI routers. This supports iterative API changes across features like users and profiles while maintaining reliable backward compatibility.

Can I use FastAPI routers to structure authentication and user profile endpoints?

Yes, you can use FastAPI routers to structure authentication and user profile endpoints by separating route logic into distinct modules. This enforces consistent endpoint patterns, structured OpenAPI generation, and clear error handling across secure API interfaces.

Why does my FastAPI OpenAPI contract not match my Pydantic models?

Your FastAPI OpenAPI contract might not match your Pydantic models if type hints are missing or incorrect in your route definitions. FastAPI relies on explicit Pydantic type-driven validation to accurately generate the OpenAPI schema and validate interface contracts.