feat(f3): Gate-F-Pflichttest bestanden — Minimal-Plugin NUR aus dem Guide gebaut
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
Der Pflichttest (Guide-Kapitel 29.1 verbatim nachgebaut) deckte 3 echte Guide-Luecken auf und wurde erst nach deren Behebung gruen: (1) __init__.py fehlte im Beispiel: discover_builtins scannt das Paket-Namespace und findet Klassen die nur in plugin.py leben nie. (2) Route brauchte vollen Pfad: main.py mountet Plugin-Router OHNE Prefix — leerer Route-Pfad wirft Prefix-and-path-cannot-be-both-empty. (3) Plugin-Routen werden dynamisch dispatched: sie erscheinen NIE in app.routes. Alle 3 Luecken sind jetzt in Kapitel 29.1 mit Warnhinweis dokumentiert; tests/test_gate_f_minimal_example.py beweist dauerhaft dass ein Guide-faehiges Plugin funktioniert. Beweise: Gate-F-Suite 4/4 gruen; ruff clean; Cross-Plugin-Scan sauber.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app.deps import get_current_user, require_permission
|
||||
|
||||
# NOTE: main.py mounts plugin routers WITHOUT a prefix — the manifest's
|
||||
# route path is documentation only. The full path must live here.
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get(
|
||||
"/api/v1/minimal-example",
|
||||
dependencies=[Depends(require_permission("minimal_example:read"))],
|
||||
)
|
||||
async def list_items(current_user: dict = Depends(get_current_user)):
|
||||
return {"items": []}
|
||||
Reference in New Issue
Block a user