New Endpoint banner
colossus-lab colossus-lab

New Endpoint

Development community

Description

# Create new FastAPI endpoint: $ARGUMENTS Add a new endpoint to the API. Follow these steps: ## 1. Create the router Create `src/app/presentation/http/controllers/{module}/{module}_router.py`: ```python from fastapi import APIRouter from dishka.integrations.fastapi import FromDishka, inject from pydantic import BaseModel router = APIRouter(prefix="/{module}", tags=["{module}"]) class {Module}Request(BaseModel): field: str class {Module}Response(BaseModel): result: str @router.pos

Installation

Installs to ~/.claude/commands/colossus-lab-openarg_backend-new-endpoint.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/colossus-lab/openarg_backend/HEAD/.claude/commands/new-endpoint.md -o ~/.claude/commands/colossus-lab-openarg_backend-new-endpoint.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository