Skip to content

Commit 1d41b56

Browse files
Merge pull request #399 from tcet-opensource/289--Feat]-Write-APIDOCs-for-faculty
289 [feat] apidoc for faculty, 286-mega feat
2 parents 208470e + ca8c193 commit 1d41b56

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

_apidoc.js

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,3 +1411,123 @@
14111411
* @apiSuccess {Number} student.roll no of the student.
14121412
* @apiSuccess {ObjectId} student.coursesOpted by the student(ObjectId).
14131413
*/
1414+
// ------------------------------------------------------------------------------------------
1415+
// Faculty
1416+
// ------------------------------------------------------------------------------------------
1417+
/**
1418+
* @api {post} /faculty/add Add Faculty
1419+
* @apiName AddFaculty
1420+
* @apiGroup Faculty
1421+
* @apiDescription Add a new faculty member.
1422+
*
1423+
* @apiBody {String} ERPID Employee ID of the faculty.
1424+
* @apiBody {Date} dateOfJoining Date of joining the institution.
1425+
* @apiBody {Date} dateOfLeaving Date of leaving the institution.
1426+
* @apiBody {String} profileLink Link to faculty member's profile.
1427+
* @apiBody {String[]} qualifications List of qualifications.
1428+
* @apiBody {Number} totalExperience Total years of experience.
1429+
* @apiBody {String[]} achievements List of achievements.
1430+
* @apiBody {String[]} areaOfSpecialization List of areas of specialization.
1431+
* @apiBody {Number} papersPublishedPG Number of papers published at the PG level.
1432+
* @apiBody {Number} papersPublishedUG Number of papers published at the UG level.
1433+
* @apiBody {ObjectId} department ID of the department (ObjectId).
1434+
* @apiBody {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1435+
* @apiBody {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1436+
* @apiBody {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1437+
* @apiBody {String} additionalResponsibilities Additional responsibilities of the faculty.
1438+
*
1439+
* @apiSuccess {String} res Response message.
1440+
* @apiError (Error 500) DatabaseError Err message if there is an error inserting into the database.
1441+
*
1442+
* @apiSuccessExample Success-Response:
1443+
* HTTP/1.1 200 OK
1444+
* {
1445+
* "res": "Added faculty"
1446+
* }
1447+
*
1448+
* @apiErrorExample Error-Response:
1449+
* HTTP/1.1 500 Internal Server Error
1450+
* {
1451+
* "err": "Error while inserting in DB"
1452+
* }
1453+
*/
1454+
1455+
/**
1456+
* @api {delete} /faculty/delete/:facultyId Delete Faculty
1457+
* @apiName DeleteFaculty
1458+
* @apiGroup Faculty
1459+
*
1460+
* @apiParam {String} facultyId The ID of the faculty member to delete.
1461+
*
1462+
* @apiSuccess {String} res Success message indicating the deletion.
1463+
*
1464+
* @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
1465+
*/
1466+
1467+
/**
1468+
* @api {post} /faculty/update/:id Update Faculty
1469+
* @apiName UpdateFaculty
1470+
* @apiGroup Faculty
1471+
* @apiDescription Update existing faculty member's data.
1472+
*
1473+
* @apiParam {String} id The faculty member's document to update.
1474+
* @apiBody {String} id ID of the faculty member to be updated.
1475+
* @apiBody {String} ERPID Employee ID of the faculty.
1476+
* @apiBody {Date} dateOfJoining Date of joining the institution.
1477+
* @apiBody {Date} dateOfLeaving Date of leaving the institution.
1478+
* @apiBody {String} profileLink Link to faculty member's profile.
1479+
* @apiBody {String[]} qualifications List of qualifications.
1480+
* @apiBody {Number} totalExperience Total years of experience.
1481+
* @apiBody {String[]} achievements List of achievements.
1482+
* @apiBody {String[]} areaOfSpecialization List of areas of specialization.
1483+
* @apiBody {Number} papersPublishedPG Number of papers published at the PG level.
1484+
* @apiBody {Number} papersPublishedUG Number of papers published at the UG level.
1485+
* @apiBody {ObjectId} department ID of the department (ObjectId).
1486+
* @apiBody {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1487+
* @apiBody {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1488+
* @apiBody {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1489+
* @apiBody {String} additionalResponsibilities Additional responsibilities of the faculty.
1490+
*
1491+
* @apiSuccess {String} res Faculty member's data updated.
1492+
* @apiError (Error 500) DatabaseError Error in updating the database.
1493+
*/
1494+
1495+
/**
1496+
* @api {get} /faculty/list Get Faculty List
1497+
* @apiName GetFacultyList
1498+
* @apiGroup Faculty
1499+
*
1500+
* @apiQuery {String} ERPID Employee ID of the faculty.
1501+
* @apiQuery {Date} dateOfJoining Date of joining the institution.
1502+
* @apiQuery {Date} dateOfLeaving Date of leaving the institution.
1503+
* @apiQuery {String} profileLink Link to faculty member's profile.
1504+
* @apiQuery {String[]} qualifications List of qualifications.
1505+
* @apiQuery {Number} totalExperience Total years of experience.
1506+
* @apiQuery {String[]} achievements List of achievements.
1507+
* @apiQuery {String[]} areaOfSpecialization List of areas of specialization.
1508+
* @apiQuery {Number} papersPublishedPG Number of papers published at the PG level.
1509+
* @apiQuery {Number} papersPublishedUG Number of papers published at the UG level.
1510+
* @apiQuery {ObjectId} department ID of the department (ObjectId).
1511+
* @apiQuery {ObjectId[]} preferredSubjects List of preferred subjects (ObjectId).
1512+
* @apiQuery {String[]} designation Faculty member's designation (one of the possible values: "HOD", "Assistant Professor", "Associate Professor", "Activity Head").
1513+
* @apiQuery {String} natureOfAssociation Nature of association with the institution (one of the possible values: "Regular", "Contract", "Adjunct").
1514+
* @apiQuery {String} additionalResponsibilities Additional responsibilities of the faculty.
1515+
*
1516+
* @apiSuccess {Faculty[]} res Array of filtered faculty member documents.
1517+
* @apiSuccess {String} faculty._id ID of the faculty member document given by the database.
1518+
* @apiSuccess {String} faculty.ERPID Employee ID of the faculty.
1519+
* @apiSuccess {Date} faculty.dateOfJoining Date of joining the institution.
1520+
* @apiSuccess {Date} faculty.dateOfLeaving Date of leaving the institution.
1521+
* @apiSuccess {String} faculty.profileLink Link to faculty member's profile.
1522+
* @apiSuccess {String[]} faculty.qualifications List of qualifications.
1523+
* @apiSuccess {Number} faculty.totalExperience Total years of experience.
1524+
* @apiSuccess {String[]} faculty.achievements List of achievements.
1525+
* @apiSuccess {String[]} faculty.areaOfSpecialization List of areas of specialization.
1526+
* @apiSuccess {Number} faculty.papersPublishedPG Number of papers published at the PG level.
1527+
* @apiSuccess {Number} faculty.papersPublishedUG Number of papers published at the UG level.
1528+
* @apiSuccess {ObjectId} faculty.department ID of the department.
1529+
* @apiSuccess {ObjectId[]} faculty.preferredSubjects List of preferred subjects.
1530+
* @apiSuccess {String[]} faculty.designation Faculty member's designation.
1531+
* @apiSuccess {String} faculty.natureOfAssociation Nature of association with the institution.
1532+
* @apiSuccess {String} faculty.additionalResponsibilities Additional responsibilities of the faculty.
1533+
**/

0 commit comments

Comments
 (0)