Skip to content

Commit ff7e6b9

Browse files
Merge pull request #348 from tcet-opensource/279-assignment-apidoc
279 assignment apidoc
2 parents 7ba2e37 + 46b6382 commit ff7e6b9

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

_apidoc.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,35 @@
667667
*/
668668

669669
// ------------------------------------------------------------------------------------------
670+
// Assignment.
671+
// ------------------------------------------------------------------------------------------
672+
/**
673+
* @api {post} /assignment/add Add assignment
674+
* @apiName Addassignment
675+
* @apiGroup assignment
676+
* @apiDescription Add a new assignment.
677+
*
678+
* @apiBody {String} no Assignment number.
679+
* @apiBody {String} title assignment title.
680+
* @apiBody {String} type type of assignment.
681+
* @apiBody {Number} marks marks in assignment.
682+
*
683+
* @apiSuccess {String} res Response message.
684+
* @apiError (Error 500) UserNotFound The of the User was not found
685+
*
686+
* @apiSuccessExample Success-Response:
687+
* HTTP/1.1 200 OK
688+
* {
689+
* "res": "added assignment Example Assignment"
690+
* }
691+
*
692+
* @apiErrorExample Error-Response:
693+
* HTTP/1.1 500 Internal Server Error
694+
* {
695+
* "err": "Error while inserting in DB"
696+
* }
697+
*/
698+
// ------------------------------------------------------------------------------------------
670699
// Practical.
671700
// ------------------------------------------------------------------------------------------
672701

@@ -794,6 +823,54 @@
794823
* }
795824
*/
796825

826+
/**
827+
* @api {delete} /assignment/delete/:assignmentId To delete Assignment
828+
* @apiName DeleteAssignment
829+
* @apiGroup Assignment
830+
*
831+
* @apiParam {String} assignmentId The ID of the assignment document to delete.
832+
*
833+
* @apiSuccess {String} res Success message indicating the deletion.
834+
*
835+
* @apiError (Error 500) err Error message if there was an error during the deletion.
836+
*
837+
* */
838+
839+
/**
840+
* @api {post} /assignment/update update assignment details
841+
* @apiName UpdateAssignment
842+
* @apiGroup Assignment
843+
* @apiDescription update Existing assignment
844+
*
845+
* @apiBody {String} id Id of the assignment to be updated
846+
* @apiBody {String} [no] Assignment number.
847+
* @apiBody {String} [title] assignment title.
848+
* @apiBody {String} [type] type of assignment.
849+
* @apiBody {Number} [marks] marks in assignment.
850+
*
851+
* @apiSuccess {String} res Assignment updated.
852+
* @apiError (Error 500) err Error in updating database
853+
*
854+
*/
855+
856+
/**
857+
* @api {get} assignment/list Get Assignment List
858+
* @apiName GetAssignment
859+
* @apiGroup Assignment
860+
*
861+
* @apiBody {String} [no] Number of assignment.
862+
* @apiBody {String} [title] Title of assignment.
863+
* @apiBody {String} [type] type of assignment.
864+
* @apiBody {Number} [marks] marks in assignment.
865+
*
866+
* @apiSuccess {assignment[]} res Array of Filtered assignment Doc.
867+
* @apiSuccess {String} assignment._id ID of document given by database.
868+
* @apiBody {String} [no] Number of assignment.
869+
* @apiBody {String} [title] Title of assignment.
870+
* @apiBody {String} [type] type of assignment.
871+
* @apiBody {Number} [marks] marks in assignment.
872+
*/
873+
797874
// ------------------------------------------------------------------------------------------
798875
// Semester
799876
// ------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)