@cubocicloide/stack-react-fastapi 13.1.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +84 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/aws-eks/backend/Dockerfile.prod.hbs +11 -4
- package/templates/aws-eks/docs/docs/deploy.md.hbs +29 -0
- package/templates/aws-eks/frontend/Dockerfile.prod +7 -3
- package/templates/aws-eks/frontend/nginx.conf +2 -1
- package/templates/aws-eks/iac/helm/app/values.yaml.hbs +3 -2
- package/templates/aws-eks/iac/terraform/bootstrap/main.tf.hbs +23 -3
- package/templates/aws-eks/iac/terraform/main.tf.hbs +10 -1
- package/templates/base/CLAUDE.md.hbs +14 -1
- package/templates/base/README.md.hbs +2 -2
- package/templates/base/backend/app/core/api_docs.py.hbs +182 -0
- package/templates/base/backend/app/main.py.hbs +22 -3
- package/templates/base/backend/app/routers/health.py +10 -2
- package/templates/base/backend/pyproject.toml.hbs +4 -0
- package/templates/base/docs/docs/dude.md.hbs +21 -2
- package/templates/base/docs/docs/index.md.hbs +2 -1
- package/templates/base/frontend/src/openapi/utils/openapi.yaml.hbs +6 -4
- package/templates/base/frontend/src/pages/index.tsx +2 -2
- package/templates/base/security/_trivyignore.yaml +49 -0
- package/templates/postgres/backend/app/routers/users.py +10 -2
- package/templates/postgres/backend/app/routers/users__id.py +10 -2
|
@@ -7,11 +7,19 @@ from app.core.database import get_db
|
|
|
7
7
|
from app.models.user import User
|
|
8
8
|
from app.queries.users import UsersQueries
|
|
9
9
|
|
|
10
|
-
router = APIRouter(tags=["
|
|
10
|
+
router = APIRouter(tags=["Users"])
|
|
11
11
|
_users = UsersQueries()
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@router.get(
|
|
14
|
+
@router.get(
|
|
15
|
+
"/users/{id}",
|
|
16
|
+
response_model=User,
|
|
17
|
+
summary="Retrieve a user",
|
|
18
|
+
description=(
|
|
19
|
+
'An unknown id returns `404` with `{"detail": "User not found"}`. A '
|
|
20
|
+
"non-integer id never reaches this handler — FastAPI rejects it with `422`."
|
|
21
|
+
),
|
|
22
|
+
)
|
|
15
23
|
def get_users__id(id: int, db: Session = Depends(get_db)) -> User:
|
|
16
24
|
"""Return a single user by ID."""
|
|
17
25
|
user = _users.get_by_id(db, id)
|