@@ -699,6 +699,7 @@ paths:
699
699
college : NITT
700
700
avatarId : 1
701
701
tutorialLevel : 2
702
+ codeTutorialLevel : 3
702
703
tier : TIER1
703
704
isProfileComplete : true
704
705
isTutorialComplete : true
@@ -1588,6 +1589,73 @@ paths:
1588
1589
description : Gets all statistics for the current user
1589
1590
parameters : []
1590
1591
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
+
1591
1659
components :
1592
1660
schemas :
1593
1661
UserMatchStats :
@@ -2060,6 +2128,9 @@ components:
2060
2128
tutorialLevel :
2061
2129
type : integer
2062
2130
example : 1
2131
+ codeTutorialLevel :
2132
+ type : integer
2133
+ example : 3
2063
2134
tier :
2064
2135
$ref : ' #/components/schemas/TierType'
2065
2136
isProfileComplete :
@@ -2077,6 +2148,7 @@ components:
2077
2148
- college
2078
2149
- avatarId
2079
2150
- tutorialLevel
2151
+ - codeTutorialLevel
2080
2152
- isProfileComplete
2081
2153
- isTutorialComplete
2082
2154
UpdateCurrentUserProfile :
@@ -2296,6 +2368,29 @@ components:
2296
2368
- destruction
2297
2369
- coinsUsed
2298
2370
- 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
2299
2394
GameLog :
2300
2395
type : string
2301
2396
description : Game log model
@@ -2351,6 +2446,45 @@ components:
2351
2446
required :
2352
2447
- user
2353
2448
- 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
2354
2488
2355
2489
DailyChallengeGetRequest :
2356
2490
title : Get daily challenge
@@ -2417,6 +2551,22 @@ components:
2417
2551
$ref : ' #/components/schemas/Language'
2418
2552
required :
2419
2553
- 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
2420
2570
GenericError :
2421
2571
title : GenericError
2422
2572
type : object
0 commit comments