@@ -699,6 +699,7 @@ paths:
699699 college : NITT
700700 avatarId : 1
701701 tutorialLevel : 2
702+ codeTutorialLevel : 3
702703 tier : TIER1
703704 isProfileComplete : true
704705 isTutorialComplete : true
@@ -1588,6 +1589,73 @@ paths:
15881589 description : Gets all statistics for the current user
15891590 parameters : []
15901591
1592+ ' /codetutorial/get/{codeTutorialNumber} ' :
1593+ get :
1594+ summary : Get tutorial by number
1595+ description : Get a single tutorial
1596+ operationId : getCodeTutorialByNumber
1597+ parameters :
1598+ - name : codeTutorialNumber
1599+ in : path
1600+ required : true
1601+ schema :
1602+ type : integer
1603+ responses :
1604+ 200 :
1605+ description : OK
1606+ content :
1607+ application/json :
1608+ schema :
1609+ $ref : ' #/components/schemas/TutorialsGetRequest'
1610+ 401 :
1611+ description : Unauthorized
1612+ 403 :
1613+ description : Forbidden
1614+ 404 :
1615+ description : Not found
1616+ tags :
1617+ - Tutorials
1618+
1619+ /codetutorial/submit :
1620+ post :
1621+ summary : Match Execution for Tutorials
1622+ description : Match making for Tutorials
1623+ operationId : createCodeTutorialMatch
1624+ responses :
1625+ ' 201 ' :
1626+ description : Created
1627+ ' 400 ' :
1628+ description : Bad Request
1629+ headers : {}
1630+ content :
1631+ application/json :
1632+ schema :
1633+ $ref : ' #/components/schemas/GenericError'
1634+ examples :
1635+ Example :
1636+ value :
1637+ message : Some field missing
1638+ ' 401 ' :
1639+ description : Unauthorized
1640+ requestBody :
1641+ required : true
1642+ content :
1643+ application/json :
1644+ schema :
1645+ $ref : ' #/components/schemas/CodeTutorialMatchRequest'
1646+ examples :
1647+ CodeExample :
1648+ value :
1649+ value : ' #include<iostream>'
1650+ language : CPP
1651+ codeTutorialNumber : 2
1652+ MapExample :
1653+ value :
1654+ value : ' [[0,0,0]]'
1655+ codeTutorialNumber : 6
1656+ tags :
1657+ - Tutorials
1658+
15911659components :
15921660 schemas :
15931661 UserMatchStats :
@@ -2060,6 +2128,9 @@ components:
20602128 tutorialLevel :
20612129 type : integer
20622130 example : 1
2131+ codeTutorialLevel :
2132+ type : integer
2133+ example : 3
20632134 tier :
20642135 $ref : ' #/components/schemas/TierType'
20652136 isProfileComplete :
@@ -2077,6 +2148,7 @@ components:
20772148 - college
20782149 - avatarId
20792150 - tutorialLevel
2151+ - codeTutorialLevel
20802152 - isProfileComplete
20812153 - isTutorialComplete
20822154 UpdateCurrentUserProfile :
@@ -2296,6 +2368,29 @@ components:
22962368 - destruction
22972369 - coinsUsed
22982370 - status
2371+ TutorialGame :
2372+ title : Game
2373+ type : object
2374+ description : Game model
2375+ properties :
2376+ id :
2377+ type : string
2378+ format : uuid
2379+ example : 123e4567-e89b-12d3-a456-426614174000
2380+ destruction :
2381+ type : number
2382+ example : 100
2383+ coinsUsed :
2384+ type : integer
2385+ logs :
2386+ type : string
2387+ status :
2388+ $ref : ' #/components/schemas/GameStatus'
2389+ required :
2390+ - id
2391+ - destruction
2392+ - coinsUsed
2393+ - status
22992394 GameLog :
23002395 type : string
23012396 description : Game log model
@@ -2351,6 +2446,45 @@ components:
23512446 required :
23522447 - user
23532448 - stats
2449+ TutorialsGetRequest :
2450+ title : Get tutorials
2451+ description : Get the game tutorials
2452+ type : object
2453+ properties :
2454+ tutorialId :
2455+ type : integer
2456+ example : 1
2457+ tutorialName :
2458+ type : string
2459+ example : Tutorial for Spawning attacker
2460+ tutorialType :
2461+ $ref : ' #/components/schemas/ChallengeType'
2462+ description :
2463+ type : string
2464+ example : Brief description of how the code works
2465+ tutorialCodes :
2466+ $ref : ' #/components/schemas/TutorialCodeObject'
2467+ required :
2468+ - tutorialId
2469+ - tutorialName
2470+ - tutorialCodes
2471+
2472+ TutorialCodeObject :
2473+ title : Tutorial Code Object
2474+ description : The object containing the code for the tutorial
2475+ type : object
2476+ properties :
2477+ cpp :
2478+ type : string
2479+ example : This would have the cpp code for the tutorial
2480+ java :
2481+ type : string
2482+ example : This would have the java code for the tutorial
2483+ python :
2484+ type : string
2485+ example : This would have the python code for the tutorial
2486+ image :
2487+ type : string
23542488
23552489 DailyChallengeGetRequest :
23562490 title : Get daily challenge
@@ -2417,6 +2551,22 @@ components:
24172551 $ref : ' #/components/schemas/Language'
24182552 required :
24192553 - value
2554+ CodeTutorialMatchRequest :
2555+ title : CodeTutorialMatchRequest
2556+ description : Request Model for the tutorial mode
2557+ type : object
2558+ properties :
2559+ value :
2560+ type : string
2561+ example : ' #include<iostream>'
2562+ language :
2563+ $ref : ' #/components/schemas/Language'
2564+ codeTutorialNumber :
2565+ type : integer
2566+ nullable : false
2567+ required :
2568+ - value
2569+ - codeTutorialNumber
24202570 GenericError :
24212571 title : GenericError
24222572 type : object
0 commit comments