endpoint

Enforce audience-first routing and five-parameter endpoint shape for FastAPI endpoints.

33|5|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/ocbunknown/fastapi-claude-template --skill endpoint-ocbunknown
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: endpoint
Source: https://github.com/ocbunknown/fastapi-claude-template/tree/main/.claude/skills/endpoint
Command: npx skills add https://github.com/ocbunknown/fastapi-claude-template --skill endpoint-ocbunknown

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and edit FastAPI endpoints under src/presentation/http/v1/endpoints/<audience>/ with a strict pattern: audience-first organization, exact parameter naming (data for bodies, query for GET filters), a fixed five-parameter endpoint shape, correct Require + Authorization wiring, and consistent contract ↔ Result mapping.

Core Features & Use Cases

  • Enforces architecture rules for endpoint placement and access control, reducing coupling between presentation and application logic.
  • Guides consistent input shapes across GET and mutating operations, ensuring predictable integration with RequestBus and contracts.
  • Supports best-practice separation of concerns, allowing easy auditing and onboarding for new endpoints.

Quick Start

Create a new endpoint module under the appropriate audience folder and wire it to the shared request bus.

Frequently Asked Questions about endpoint

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

FAQPage Schema
How do I structure FastAPI endpoints with audience-based routing and authorization?

FastAPI endpoints require organizing modules under audience-specific folders and wiring authorization through Require. This approach enforces strict parameter naming and contract-to-Result mapping for secure routing.

What is the correct parameter naming convention for FastAPI request bodies and query filters?

FastAPI parameter naming convention dictates using 'data' for request bodies and 'query' for GET filters. This ensures predictable integration with RequestBus and consistent input shapes across operations.

How do I enforce a fixed five-parameter endpoint shape in FastAPI?

A fixed five-parameter endpoint shape in FastAPI is enforced by applying architectural rules to endpoint modules. This separates presentation from application logic, ensuring reliable and testable endpoint contracts.

Does this endpoint pattern support separating presentation logic from application logic in FastAPI?

Yes, the endpoint pattern supports separating presentation logic from application logic in FastAPI. It enforces architecture rules for endpoint placement and access control, reducing coupling between layers.

When do I need audience-first organization for FastAPI endpoints?

Audience-first organization for FastAPI endpoints is needed when building secure, audience-aware APIs. It enforces correct authorization wiring and consistent contract mapping, allowing easy auditing and onboarding.

Why does my FastAPI endpoint contract mapping fail with inconsistent input shapes?

FastAPI endpoint contract mapping fails when input shapes are inconsistent across GET and mutating operations. Enforcing exact parameter naming and a fixed endpoint shape ensures reliable RequestBus integration.