Skip to content

Releases: RoninForge/roninforge-fastapi

v1.0.2

12 Apr 10:42

Choose a tag to compare

Fix remaining get_event_loop reference in anti-patterns bullet list.

v1.0.1 - Review Fixes

12 Apr 10:20

Choose a tag to compare

Fixes from independent code review

Critical:

  • Fix JWT sub claim type bug: decode as str then cast (JWT spec mandates string sub)
  • Add WWW-Authenticate: Bearer header on all 401 responses (RFC 6750 compliance)
  • Replace python-jose with PyJWT (python-jose unmaintained, has CVEs)
  • Fix model_validator(mode='before') parameter type: Any not dict

Async correctness:

  • Replace deprecated asyncio.get_event_loop() with asyncio.get_running_loop() (Python 3.10+)
  • Fix db.stream() API: use stream_scalars() which yields individual rows, not batches
  • Move ProcessPoolExecutor lifecycle into lifespan context manager (prevents process leak)

Consistency:

  • Remove Django ORM term (select_related) from FastAPI skill, use selectinload/joinedload
  • Remove **/models.py from Pydantic v2 rule globs (those are SQLAlchemy files, not Pydantic schemas)
  • Clarify model_validator mode parameter is required, not optional
  • Add magic bytes verification note for file upload MIME type checking
  • Rename anti-pattern 12 heading for clarity

v1.0.0 - Initial Release

12 Apr 10:10

Choose a tag to compare

Cursor plugin for FastAPI + Pydantic v2

First FastAPI plugin on the Cursor marketplace. Prevents Pydantic v1 hallucinations, async event loop blocking, and teaches idiomatic async Python.

What's included

5 rule files:

  • Core FastAPI patterns (always active)
  • Anti-pattern detection: 13 AI mistakes (always active)
  • Pydantic v2 migration: methods, validators, config, fields (auto on schema files)
  • Async patterns: event loop safety, blocking detection, SQLAlchemy (auto on route files)
  • Security: JWT, password hashing, file uploads, CORS (agent-requested)

4 skills:

  • /fastapi-endpoint - Generate CRUD endpoint with v2 schemas and async queries
  • /fastapi-model - Generate SQLAlchemy model + Pydantic v2 schemas
  • /fastapi-validate - Scan for v1 leftovers, async blocking, security gaps
  • /fastapi-settings - Set up pydantic-settings with env vars and DI

1 subagent:

  • fastapi-reviewer - Code review for v1 patterns, async safety, security

Install

git clone https://github.com/RoninForge/roninforge-fastapi.git ~/.cursor/plugins/local/roninforge-fastapi