feat(public-gallery): add public templates gallery API (Tasks 2 & 3)
Implements a no-auth read-only API for the public templates gallery page: - Schemas in schemas/public_templates.py (PublicFlowTemplate, PublicScriptTemplate, PublicGalleryResponse, PublicFlowDetail, PublicScriptDetail) - Five endpoints under /api/v1/public/templates: listing, flow detail, script detail, categories with counts, full-text search - Tree preview truncated to 3 levels max; script_body never exposed - Rate limited at 30/minute; paginated with category/type/sort filters - 25 passing integration tests covering feature flags, truncation, script body protection, search, categories, and 404 behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@ from app.api.endpoints import ai_sessions
|
||||
from app.api.endpoints import flow_proposals
|
||||
from app.api.endpoints import flowpilot_analytics
|
||||
from app.api.endpoints import notifications
|
||||
from app.api.endpoints import public_templates
|
||||
|
||||
api_router = APIRouter()
|
||||
|
||||
@@ -75,3 +76,4 @@ api_router.include_router(ai_sessions.router)
|
||||
api_router.include_router(flow_proposals.router)
|
||||
api_router.include_router(flowpilot_analytics.router)
|
||||
api_router.include_router(notifications.router)
|
||||
api_router.include_router(public_templates.router)
|
||||
|
||||
Reference in New Issue
Block a user