Skip to content

Commit e82e85d

Browse files
committed
refactor: remove unused user registration route and example user fetching route from API
1 parent 40cac89 commit e82e85d

File tree

3 files changed

+2
-385
lines changed

3 files changed

+2
-385
lines changed

services/backend/api-spec.json

Lines changed: 0 additions & 208 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
}
2626
}
2727
},
28-
"/api/users-example": {
29-
"get": {
30-
"responses": {
31-
"200": {
32-
"description": "Default Response"
33-
}
34-
}
35-
}
36-
},
3728
"/api/db/status": {
3829
"get": {
3930
"summary": "Get database status",
@@ -228,205 +219,6 @@
228219
}
229220
}
230221
},
231-
"/register": {
232-
"post": {
233-
"summary": "User registration via email",
234-
"tags": [
235-
"Authentication"
236-
],
237-
"description": "Creates a new user account using email and password. The first registered user automatically becomes a global administrator. Automatically creates a session and default team for the user.",
238-
"requestBody": {
239-
"content": {
240-
"application/json": {
241-
"schema": {
242-
"type": "object",
243-
"properties": {
244-
"username": {
245-
"type": "string",
246-
"minLength": 3,
247-
"maxLength": 30,
248-
"pattern": "^[a-zA-Z0-9_]+$"
249-
},
250-
"email": {
251-
"type": "string",
252-
"format": "email"
253-
},
254-
"password": {
255-
"type": "string",
256-
"minLength": 8,
257-
"maxLength": 100
258-
},
259-
"first_name": {
260-
"type": "string",
261-
"maxLength": 50
262-
},
263-
"last_name": {
264-
"type": "string",
265-
"maxLength": 50
266-
}
267-
},
268-
"required": [
269-
"username",
270-
"email",
271-
"password"
272-
],
273-
"additionalProperties": false
274-
}
275-
}
276-
},
277-
"required": true
278-
},
279-
"responses": {
280-
"201": {
281-
"description": "User registered successfully",
282-
"content": {
283-
"application/json": {
284-
"schema": {
285-
"type": "object",
286-
"properties": {
287-
"success": {
288-
"type": "boolean",
289-
"description": "Indicates if the registration was successful"
290-
},
291-
"message": {
292-
"type": "string",
293-
"description": "Success message"
294-
},
295-
"user": {
296-
"type": "object",
297-
"properties": {
298-
"id": {
299-
"type": "string",
300-
"description": "User ID"
301-
},
302-
"username": {
303-
"type": "string",
304-
"description": "User's username"
305-
},
306-
"email": {
307-
"type": "string",
308-
"format": "email",
309-
"description": "User's email address"
310-
},
311-
"first_name": {
312-
"type": "string",
313-
"nullable": true,
314-
"description": "User's first name"
315-
},
316-
"last_name": {
317-
"type": "string",
318-
"nullable": true,
319-
"description": "User's last name"
320-
},
321-
"role_id": {
322-
"type": "string",
323-
"description": "User's role ID"
324-
}
325-
},
326-
"required": [
327-
"id",
328-
"username",
329-
"email",
330-
"first_name",
331-
"last_name",
332-
"role_id"
333-
],
334-
"additionalProperties": false,
335-
"description": "Information about the registered user"
336-
}
337-
},
338-
"required": [
339-
"success",
340-
"message",
341-
"user"
342-
],
343-
"additionalProperties": false,
344-
"description": "User registered successfully"
345-
}
346-
}
347-
}
348-
},
349-
"400": {
350-
"description": "Bad Request - Invalid input, username taken, or email already in use",
351-
"content": {
352-
"application/json": {
353-
"schema": {
354-
"type": "object",
355-
"properties": {
356-
"success": {
357-
"type": "boolean",
358-
"description": "Indicates if the operation was successful (false for errors)",
359-
"default": false
360-
},
361-
"error": {
362-
"type": "string",
363-
"description": "Error message describing what went wrong"
364-
}
365-
},
366-
"required": [
367-
"error"
368-
],
369-
"additionalProperties": false,
370-
"description": "Bad Request - Invalid input, username taken, or email already in use"
371-
}
372-
}
373-
}
374-
},
375-
"403": {
376-
"description": "Forbidden - Email registration is disabled by administrator",
377-
"content": {
378-
"application/json": {
379-
"schema": {
380-
"type": "object",
381-
"properties": {
382-
"success": {
383-
"type": "boolean",
384-
"description": "Indicates if the operation was successful (false for errors)",
385-
"default": false
386-
},
387-
"error": {
388-
"type": "string",
389-
"description": "Error message describing what went wrong"
390-
}
391-
},
392-
"required": [
393-
"error"
394-
],
395-
"additionalProperties": false,
396-
"description": "Forbidden - Email registration is disabled by administrator"
397-
}
398-
}
399-
}
400-
},
401-
"500": {
402-
"description": "Internal Server Error - Registration failed",
403-
"content": {
404-
"application/json": {
405-
"schema": {
406-
"type": "object",
407-
"properties": {
408-
"success": {
409-
"type": "boolean",
410-
"description": "Indicates if the operation was successful (false for errors)",
411-
"default": false
412-
},
413-
"error": {
414-
"type": "string",
415-
"description": "Error message describing what went wrong"
416-
}
417-
},
418-
"required": [
419-
"error"
420-
],
421-
"additionalProperties": false,
422-
"description": "Internal Server Error - Registration failed"
423-
}
424-
}
425-
}
426-
}
427-
}
428-
}
429-
},
430222
"/api/roles": {
431223
"get": {
432224
"responses": {

services/backend/api-spec.yaml

Lines changed: 0 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ paths:
1616
responses:
1717
"200":
1818
description: Default Response
19-
/api/users-example:
20-
get:
21-
responses:
22-
"200":
23-
description: Default Response
2419
/api/db/status:
2520
get:
2621
summary: Get database status
@@ -157,152 +152,6 @@ paths:
157152
- error
158153
additionalProperties: false
159154
description: Internal Server Error - Database setup failed
160-
/register:
161-
post:
162-
summary: User registration via email
163-
tags:
164-
- Authentication
165-
description: Creates a new user account using email and password. The first
166-
registered user automatically becomes a global administrator.
167-
Automatically creates a session and default team for the user.
168-
requestBody:
169-
content:
170-
application/json:
171-
schema:
172-
type: object
173-
properties:
174-
username:
175-
type: string
176-
minLength: 3
177-
maxLength: 30
178-
pattern: ^[a-zA-Z0-9_]+$
179-
email:
180-
type: string
181-
format: email
182-
password:
183-
type: string
184-
minLength: 8
185-
maxLength: 100
186-
first_name:
187-
type: string
188-
maxLength: 50
189-
last_name:
190-
type: string
191-
maxLength: 50
192-
required:
193-
- username
194-
- email
195-
- password
196-
additionalProperties: false
197-
required: true
198-
responses:
199-
"201":
200-
description: User registered successfully
201-
content:
202-
application/json:
203-
schema:
204-
type: object
205-
properties:
206-
success:
207-
type: boolean
208-
description: Indicates if the registration was successful
209-
message:
210-
type: string
211-
description: Success message
212-
user:
213-
type: object
214-
properties:
215-
id:
216-
type: string
217-
description: User ID
218-
username:
219-
type: string
220-
description: User's username
221-
email:
222-
type: string
223-
format: email
224-
description: User's email address
225-
first_name:
226-
type: string
227-
nullable: true
228-
description: User's first name
229-
last_name:
230-
type: string
231-
nullable: true
232-
description: User's last name
233-
role_id:
234-
type: string
235-
description: User's role ID
236-
required:
237-
- id
238-
- username
239-
- email
240-
- first_name
241-
- last_name
242-
- role_id
243-
additionalProperties: false
244-
description: Information about the registered user
245-
required:
246-
- success
247-
- message
248-
- user
249-
additionalProperties: false
250-
description: User registered successfully
251-
"400":
252-
description: Bad Request - Invalid input, username taken, or email already in use
253-
content:
254-
application/json:
255-
schema:
256-
type: object
257-
properties:
258-
success:
259-
type: boolean
260-
description: Indicates if the operation was successful (false for errors)
261-
default: false
262-
error:
263-
type: string
264-
description: Error message describing what went wrong
265-
required:
266-
- error
267-
additionalProperties: false
268-
description: Bad Request - Invalid input, username taken, or email already in
269-
use
270-
"403":
271-
description: Forbidden - Email registration is disabled by administrator
272-
content:
273-
application/json:
274-
schema:
275-
type: object
276-
properties:
277-
success:
278-
type: boolean
279-
description: Indicates if the operation was successful (false for errors)
280-
default: false
281-
error:
282-
type: string
283-
description: Error message describing what went wrong
284-
required:
285-
- error
286-
additionalProperties: false
287-
description: Forbidden - Email registration is disabled by administrator
288-
"500":
289-
description: Internal Server Error - Registration failed
290-
content:
291-
application/json:
292-
schema:
293-
type: object
294-
properties:
295-
success:
296-
type: boolean
297-
description: Indicates if the operation was successful (false for errors)
298-
default: false
299-
error:
300-
type: string
301-
description: Error message describing what went wrong
302-
required:
303-
- error
304-
additionalProperties: false
305-
description: Internal Server Error - Registration failed
306155
/api/roles:
307156
get:
308157
responses:

0 commit comments

Comments
 (0)