Browse Source

TAG ref without plural

Guénaël Muller 6 years ago
parent
commit
acee3c4eba

+ 2 - 2
tracim/views/core_api/user_controller.py View File

@@ -20,12 +20,12 @@ from tracim.views.controllers import Controller
20 20
 from tracim.views.core_api.schemas import UserIdPathSchema
21 21
 from tracim.views.core_api.schemas import WorkspaceDigestSchema
22 22
 
23
-USERS_ENDPOINTS_TAG = 'Users'
23
+USER_ENDPOINTS_TAG = 'Users'
24 24
 
25 25
 
26 26
 class UserController(Controller):
27 27
 
28
-    @hapic.with_api_doc(tags=[USERS_ENDPOINTS_TAG])
28
+    @hapic.with_api_doc(tags=[USER_ENDPOINTS_TAG])
29 29
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
30 30
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
31 31
     @hapic.handle_exception(UserDoesNotExist, HTTPStatus.NOT_FOUND)

+ 10 - 10
tracim/views/core_api/workspace_controller.py View File

@@ -35,12 +35,12 @@ from tracim.views.core_api.schemas import WorkspaceMemberSchema
35 35
 from tracim.models.contents import ContentTypeLegacy as ContentType
36 36
 from tracim.models.revision_protection import new_revision
37 37
 
38
-WORKSPACES_ENDPOINTS_TAG = 'Workspaces'
38
+WORKSPACE_ENDPOINTS_TAG = 'Workspaces'
39 39
 
40 40
 
41 41
 class WorkspaceController(Controller):
42 42
 
43
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
43
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
44 44
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
45 45
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
46 46
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -60,7 +60,7 @@ class WorkspaceController(Controller):
60 60
         )
61 61
         return wapi.get_workspace_with_context(request.current_workspace)
62 62
 
63
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
63
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
64 64
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
65 65
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
66 66
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -89,7 +89,7 @@ class WorkspaceController(Controller):
89 89
             for user_role in roles
90 90
         ]
91 91
 
92
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
92
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
93 93
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
94 94
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
95 95
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -125,7 +125,7 @@ class WorkspaceController(Controller):
125 125
         ]
126 126
         return contents
127 127
 
128
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
128
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
129 129
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
130 130
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
131 131
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -158,7 +158,7 @@ class WorkspaceController(Controller):
158 158
         content = api.get_content_in_context(content)
159 159
         return content
160 160
 
161
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
161
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
162 162
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
163 163
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
164 164
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -214,7 +214,7 @@ class WorkspaceController(Controller):
214 214
         )
215 215
         return api.get_content_in_context(updated_content)
216 216
 
217
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
217
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
218 218
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
219 219
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
220 220
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -249,7 +249,7 @@ class WorkspaceController(Controller):
249 249
             api.delete(content)
250 250
         return
251 251
 
252
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
252
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
253 253
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
254 254
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
255 255
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -285,7 +285,7 @@ class WorkspaceController(Controller):
285 285
             api.undelete(content)
286 286
         return
287 287
 
288
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
288
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
289 289
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
290 290
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
291 291
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
@@ -317,7 +317,7 @@ class WorkspaceController(Controller):
317 317
             api.archive(content)
318 318
         return
319 319
 
320
-    @hapic.with_api_doc(tags=[WORKSPACES_ENDPOINTS_TAG])
320
+    @hapic.with_api_doc(tags=[WORKSPACE_ENDPOINTS_TAG])
321 321
     @hapic.handle_exception(NotAuthenticated, HTTPStatus.UNAUTHORIZED)
322 322
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
323 323
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)