@@ -238,6 +238,33 @@ paths:
238238 content :
239239 application/json :
240240 schema : {}
241+ ' /api/v1/users/{userId}/profile ' :
242+ get :
243+ tags :
244+ - Users
245+ summary : Get a profile by user ID
246+ operationId : getProfileById
247+ parameters :
248+ - name : userId
249+ in : path
250+ required : true
251+ style : simple
252+ explode : false
253+ schema :
254+ type : string
255+ format : uuid
256+ example : 81e17cb6-5c46-4934-b6d5-5c8356712cb6
257+ responses :
258+ ' 200 ' :
259+ description : Detailed information of a profile
260+ content :
261+ application/json :
262+ schema :
263+ $ref : ' #/components/schemas/ProfileResponse'
264+ ' 400 ' :
265+ description : Bad request
266+ ' 500 ' :
267+ description : Failed response
241268 /api/v1/games :
242269 get :
243270 tags :
@@ -807,6 +834,50 @@ components:
807834 format : uuid
808835 example : 81e17cb6-5c46-4934-b6d5-5c8356712cb6
809836 description : Unique identifier for the result entry
837+ ProfileResponse :
838+ type : object
839+ description : The response schema for a user's profile, including id, timestamps, team name, and team history.
840+ properties :
841+ id :
842+ type : string
843+ format : uuid
844+ description : The unique identifier for the user.
845+ created_at :
846+ type : string
847+ format : date-time
848+ description : The timestamp when the user profile was created.
849+ updated_at :
850+ type : string
851+ format : date-time
852+ description : The timestamp when the user profile was last updated.
853+ team_name :
854+ type : string
855+ description : The current name of the user's team.
856+ team_history :
857+ type : array
858+ description : The list of teams the user has been part of, including the periods of membership.
859+ items :
860+ $ref : ' #/components/schemas/TeamHistory'
861+ TeamHistory :
862+ required :
863+ - name
864+ - join
865+ type : object
866+ description : The schema for recording the history of teams a user has joined and left.
867+ properties :
868+ name :
869+ type : string
870+ description : The name of the team.
871+ join :
872+ type : string
873+ format : date-time
874+ description : The timestamp when the user joined the team.
875+ example : ' 2024-01-23T04:56:07.000Z'
876+ left :
877+ type : string
878+ format : date-time
879+ description : The timestamp when the user left the team.
880+ example : ' 2024-01-23T04:56:07.000Z'
810881 UserResponse :
811882 type : object
812883 properties :
@@ -844,12 +915,12 @@ components:
844915 type : string
845916 description : The start time of the game
846917 format : date-time
847- example : ' 2000 -01-23T04:56:07.000Z'
918+ example : ' 2024 -01-23T04:56:07.000Z'
848919 end_time :
849920 type : string
850921 description : The end time of the game
851922 format : date-time
852- example : ' 2000 -01-24T04:56:07.000Z'
923+ example : ' 2024 -01-24T04:56:07.000Z'
853924 description :
854925 type : string
855926 description : A brief description of the game
@@ -868,12 +939,12 @@ components:
868939 type : string
869940 description : The start time of the game
870941 format : date-time
871- example : ' 2000 -01-23T04:56:07.000Z'
942+ example : ' 2024 -01-23T04:56:07.000Z'
872943 end_time :
873944 type : string
874945 description : The end time of the game
875946 format : date-time
876- example : ' 2000 -01-24T04:56:07.000Z'
947+ example : ' 2024 -01-24T04:56:07.000Z'
877948 description :
878949 type : string
879950 description : A brief description of the game
0 commit comments