-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST]: Breakdown of main tasks into micro tasks #16
Comments
I will work on the following
and
|
@ekpono Please pick one task and state the number. You can pick another when you are done read the updated instructions and update your comment |
Thanks for the correction @dave-ok I will go with DB design. Pardon me, am not seeing number tag on the task |
@ekpono They are numbered 1, 2 and 3 above with checkboxes |
DB Design Tasks: 1, 2 and 3 #17 The individual task isn't numbered but sub tasks |
@ekpono Ok I will make changes. I meant sub-tasks. Thanks |
Ok. @dave-ok . Can we have a group chat on Slack for ease of communication? |
@dave-ok i'll will be working on the Employee Endpoint. 1-5 |
@jan-far One sub-task at a time |
oh okay. got it. |
Please note that tasks are created in smaller chunks to allow everyone participate. Working a small task doesn't mean you are not competent. It just means you are a great team player |
@dave-ok Tests Task 2 |
@dave-ok DB Design Validation task 5 |
@dave-ok Implementation Employees Endpoint Task 2 issue #71 Transferred to @Lihemen #16 (comment) |
@josefophe I created an issue for your pull request please just add it to your comment. the issue number is #72 |
For the employee update route, please use a PATCH request instead of PUT. There’s a slight difference between the two |
@Lihemen can I transfer my task to you, I'm working on that endpoint |
Sure |
Great! I will work on the next task then. |
Is your feature request related to a problem? Please describe.
This is a ticket breaking down available tasks into smaller assignable tasks. Please indicate interest in any task you think you can handle. This is not an exhaustive list and as such suggestions and new ideas are welcome.
Any sub-task that has an issue created and assigned will be indicated here with issue number and assignee. More than one person may be assigned to a task. If there aren't enough tasks on ground. The first valid PR that satisfactorily solves an issue will be accepted and merged.
For coding tasks always lint your code and ensure existing tests and new tests are passing otherwise your PR will fail the tests run on CI and your code will not be merged. To Lint your code simply run
npm run lint
ornpm run lint:fix
to fix auto-fixable errors.DB design:
We are keeping the DB design simple. with a few tables. Please remember suggestions are welcome this is not exhaustive. Use reasonable default values for relevant fields. Note: user_id is gotten from decoding auth token
Table: Employees
Fields: employee_id: bigint, first_name varchar, last_name varchar, phone_no varchar, email varchar, hire_date date department_id bigint, address varchar, user_id bigint
Table: Departments
Fields: department_id bigint, department_name varchar, manager_id bigint, user_id bigint
DB Design Tasks:
src/api/db/sql/db-create.sql
@ekpono issue [DB-DESIGN: TASK 2 - Define SQL statement to create table Employees]: #26 solved with Db design task 2 employees #25src/api/db/sql/db-create.sql
@ekpono issue [DB-DESIGN: TASK 3 - Define SQL statement to create table Departments]: #27 solved with Db design task 3 department #24API Endpoints
The API endpoints will need validation, tests and documentation aside from implementation
Validation
src/api/utils/validationRules.js
@courage173 issue [FEATURE REQUEST]:Validation-task 1 and 2 #20 solved by [feature]: created validation middleware and employee validation schema #28src/api/utils/validationRules.js
@courage173 issue [FEATURE REQUEST]:Validation task-3 #32 solved by feature[created update emplayee schema for validation] #34src/api/utils/validationRules.js
@courage173 issue [FEATURE REQUEST]:validation task4 #35 solved by [feature]: created joi validation schema for creating a new department #38src/api/utils/validationRules.js
Implementation
Employees endpoint
1. Endpoint for creating a new employee
POST /employees
.body -
firstName(req), lastName(req), phoneNo(req), email(req), departmentId(req), hireDate(req), address, userId(req)
params - none
response - [201] - {status: success, data: employeeId}, [400] - {status: error, data: errorMessage}
2. Endpoint for updating employee
PUT /employees/:employeeId
.body -
firstName, lastName, phoneNo, email, departmentId, hireDate, address
params - employeeId (req)
response - [200] - {status: success, data: employeeDetail}, [400] - {status: error, data: errorMessage}
3. Endpoint for deleting employee
DELETE /employees/:employeeId
.body - none
params - employeeId (req)
response - [204] - {status: success, data: successMsg}, [400] - {status: error, data: errorMessage}
4. Endpoint for getting an employee
GET /employees/:employeeId
.body -
none
params - employeeId (req)
response - [200] - {status: success, data: employeeDetail}, [400] - {status: error, data: errorMessage}
5. Endpoint for getting all employees
GET /employees
.body -
none
params - employeeId (req)
response - [200] - {status: success, data: array of employeeDetail}, [400] - {status: error, data: errorMessage}
Departments Endpoint
1. Endpoint for creating a new department
POST /departments
.body -
departmentName(req), managerId
params - none
response - [201] - {status: success, data: departmentId}, [400] - {status: error, data: errorMessage}
2. Endpoint for updating department
PUT /departments/:departmentId
.body - departmentName, managerId`
params - departmentId (req)
response - [200] - {status: success, data: departmentDetail}, [400] - {status: error, data: errorMessage}
3. Endpoint for deleting department
DELETE /departments/:department
.body - none
params - departmentId (req)
response - [204] - {status: success, data: successMsg}, [400] - {status: error, data: errorMessage}
4. Endpoint for getting an department
GET /departments/:departmentId
.body -
none
params - employeeId (req)
response - [200] - {status: success, data: departmentDetail}, [400] - {status: error, data: errorMessage}
5. Endpoint for getting all departments
GET /departments
.body -
none
params - departmentId (req)
response - [200] - {status: success, data: array of departmentDetail}, [400] - {status: error, data: errorMessage}
Tests (in Jest)
1. Write unit test for validation middleware
2. Write tests for Employees endpoint 1
3. Write tests for Employees endpoint 2
4. Write tests for Employees endpoint 3
5. Write tests for Employees endpoint 4
6. Write tests for Employees endpoint 5
7. Write tests for Departments endpoint 1
8. Write tests for Departments endpoint 2
9. Write tests for Departments endpoint 3
10. Write tests for Departments endpoint 4
11. Write tests for Departments endpoint 5
Swagger API Docs
Please store all .yaml files for each resource in a separately in the jsDocs folder
Swagger JsDoc
Organizing you swagger .yaml files
1. Write API docs for Employees endpoint 1 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 1 #18 solved by Swagger's yaml file for employees #30
2. Write API docs for Employees endpoint 2 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 2 #40 solved by Swagger API Docs Task 2 #45
3. Write API docs for Employees endpoint 3 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 3 #46 solved by Swagger API Docs Task 3 #47
4. Write API docs for Employees endpoint 4 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 4 #48 solved by Swagger API Docs Task 4 #49
5. Write API docs for Employees endpoint 5 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 5 #50 solved by Swagger API Task 5 #51
6. Write API docs for Departments endpoint 1 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 6 #52 solved by Swagger API Docs Task 6 #54
7. Write API docs for Departments endpoint 2 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 7 #55 solved by Swagger API Docs Task 7 #56
8. Write API docs for Departments endpoint 3 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 8 #57 solved by Swagger API Docs Task 8 #58
9. Write API docs for Departments endpoint 4 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 9 #59 solved by Swagger API Docs Task 9 #60
10. Write API docs for Departments endpoint 5 - @simply-alliv issue [FEATURE REQUEST]: Swagger API Docs Task 10 #61 solved by Swagger API Docs Task 10 #62
Documentation
Update README.md in collaboration with docs team. Ensure all relevant details are in README including:
etc..
This is our window to the world this ensures it is packed and also regularly updated as needed
=======================================================================================================================================================================================
Above tasks will each be picked by a team member. Reply underneath this post with section and sub-task number (the checkbox number). Please tag me (@dave-ok) so I will receive a notification. Then create an issue using the feature request template for the task you intend to work on. When you are done, Indicate your name, sub-task chosen and link to issue you generated here (e.g just #16 is fine). If you have not yet gotten a response just reach out to the sub-group leads for nodeJS so that I can edit the task above indicating you have been assigned and the issue number you created.
If you comment indicating interest in a task. Create the issue right away. If after 20 mins you still haven't created an issue, the task becomes free game for anyone else who wants it.
After the task has been assigned to you, finish it promptly and move to another. When you're done signify and also update your comment where you initially added issue number to include your PR number. Don't linger on a task it may be reassigned. You snooze you lose ;)
Note
Please note that tasks are created in smaller chunks to allow everyone participate. Working a small task doesn't mean you are not competent. It just means you are a great team player
Please update your comments instead of adding another to reduce clutter. E.g to pick a task your comment could look like (include your slack username to make it easy to reach you)
after you have created an issue
after you have completed task and created a PR
The text was updated successfully, but these errors were encountered: