@@ -37,7 +37,8 @@ def get_orm_session():
3737@api_router .post (
3838 "/players/" ,
3939 status_code = status .HTTP_201_CREATED ,
40- summary = "Creates a new Player"
40+ summary = "Creates a new Player" ,
41+ tags = ["Players" ]
4142)
4243def post (
4344 player_model : PlayerModel = Body (...),
@@ -69,7 +70,8 @@ def post(
6970 "/players/" ,
7071 response_model = List [PlayerModel ],
7172 status_code = status .HTTP_200_OK ,
72- summary = "Retrieves a collection of Players"
73+ summary = "Retrieves a collection of Players" ,
74+ tags = ["Players" ]
7375)
7476@cache (expire = CACHING_TIME_IN_SECONDS )
7577def get_all (
@@ -93,7 +95,8 @@ def get_all(
9395 "/players/{player_id}" ,
9496 response_model = PlayerModel ,
9597 status_code = status .HTTP_200_OK ,
96- summary = "Retrieves a Player by its Id"
98+ summary = "Retrieves a Player by its Id" ,
99+ tags = ["Players" ]
97100)
98101@cache (expire = CACHING_TIME_IN_SECONDS )
99102def get_by_id (
@@ -125,7 +128,8 @@ def get_by_id(
125128 "/players/squadnumber/{squad_number}" ,
126129 response_model = PlayerModel ,
127130 status_code = status .HTTP_200_OK ,
128- summary = "Retrieves a Player by its Squad Number"
131+ summary = "Retrieves a Player by its Squad Number" ,
132+ tags = ["Players" ]
129133)
130134@cache (expire = CACHING_TIME_IN_SECONDS )
131135def get_by_squad_number (
@@ -158,7 +162,8 @@ def get_by_squad_number(
158162@api_router .put (
159163 "/players/{player_id}" ,
160164 status_code = status .HTTP_204_NO_CONTENT ,
161- summary = "Updates an existing Player"
165+ summary = "Updates an existing Player" ,
166+ tags = ["Players" ]
162167)
163168def put (
164169 player_id : int = Path (..., title = "The ID of the Player" ),
@@ -174,7 +179,7 @@ def put(
174179 orm_session (Session): The SQLAlchemy ORM session.
175180
176181 Raises:
177- HTTPException: HTTP 404 Not Found error if the player with the specified ID does not exist.
182+ HTTPException: HTTP 404 Not Found error if the Player with the specified ID does not exist.
178183 """
179184 player = player_service .retrieve_by_id (orm_session , player_id )
180185
@@ -191,7 +196,8 @@ def put(
191196@api_router .delete (
192197 "/players/{player_id}" ,
193198 status_code = status .HTTP_204_NO_CONTENT ,
194- summary = "Deletes an existing Player"
199+ summary = "Deletes an existing Player" ,
200+ tags = ["Players" ]
195201)
196202def delete (
197203 player_id : int = Path (..., title = "The ID of the Player" ),
0 commit comments