spakky-fastapi 0.7.8__tar.gz → 0.7.9__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: spakky-fastapi
3
- Version: 0.7.8
3
+ Version: 0.7.9
4
4
  Summary: Highly abstracted Framework core to use DDD & DI/IoC & AOP & Etc...
5
5
  Author: Spakky
6
6
  Author-email: sejong418@icloud.com
@@ -10,7 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
10
10
  Classifier: Programming Language :: Python :: 3.11
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Requires-Dist: fastapi (>=0.109.2,<0.110.0)
13
- Requires-Dist: spakky-core (>=0.7.8)
13
+ Requires-Dist: spakky-core (>=0.7.9)
14
14
  Requires-Dist: websockets (>=12.0,<13.0)
15
15
  Description-Content-Type: text/markdown
16
16
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "spakky-fastapi"
3
- version = "0.7.8"
3
+ version = "0.7.9"
4
4
  description = "Highly abstracted Framework core to use DDD & DI/IoC & AOP & Etc..."
5
5
  authors = ["Spakky <sejong418@icloud.com>"]
6
6
  readme = "README.md"
@@ -12,7 +12,7 @@ build-backend = "poetry.core.masonry.api"
12
12
  [tool.poetry.dependencies]
13
13
  python = ">=3.10"
14
14
  fastapi = "^0.109.2"
15
- spakky-core = ">=0.7.8"
15
+ spakky-core = ">=0.7.9"
16
16
  websockets = "^12.0"
17
17
 
18
18
  [tool.poetry.group.dev.dependencies]
@@ -49,7 +49,7 @@ class JWTAuth(FunctionAnnotation):
49
49
  if obj.__defaults__ is not None:
50
50
  extra = obj.__defaults__
51
51
  else:
52
- extra = tuple(Body() for x in parameters[1:] if x.name != "token")
52
+ extra = tuple([Body() for x in parameters[1:] if x.name != "token"])
53
53
  obj.__defaults__ = (Depends(self.authenticator),) + extra
54
54
  return super().__call__(obj)
55
55
 
@@ -25,7 +25,7 @@ class FastAPIBeanPostProcessor(IBeanPostProcessor):
25
25
  if not Controller.contains(bean):
26
26
  return bean
27
27
  controller = Controller.single(bean)
28
- router: APIRouter = APIRouter(prefix=controller.prefix)
28
+ router: APIRouter = APIRouter(prefix=controller.prefix, tags=[controller.prefix])
29
29
  for name, method in getmembers(bean):
30
30
  route: Route | None = Route.single_or_none(method)
31
31
  websocket_route: WebSocketRoute | None = WebSocketRoute.single_or_none(method)
@@ -33,7 +33,7 @@ class FastAPIBeanPostProcessor(IBeanPostProcessor):
33
33
  continue
34
34
  if route is not None:
35
35
  self.__logger.info(
36
- f"[{type(self).__name__}] {route.methods} {controller.prefix}{route.path} -> {method.__qualname__}"
36
+ f"[{type(self).__name__}] {route.methods!r} {controller.prefix}{route.path} -> {method.__qualname__}"
37
37
  )
38
38
  if route.name is None:
39
39
  route.name = " ".join([x.capitalize() for x in name.split("_")])
File without changes