-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add /user endpoints #2
Labels
Comments
benjaminkostiuk
added
feature
Feature or improvement
priority:high
High priority work item
labels
May 9, 2021
@youcefs21 Just take this one step at a time. You can reference the exisiting code or ask me for anything you don't understand. Most of the code should be fairly similar to what's already there but no guarantees. |
youcefs21
added a commit
that referenced
this issue
Sep 27, 2021
- Fixed up the `AssignmentEnrollment` entity - Created `AssignmentEnrollmentRepository` - Created `AssignmentEnrollmentPage` model - added test data to `bootstrap_data.sql`
youcefs21
added a commit
that referenced
this issue
Oct 5, 2021
- Renamed the assignment associated with AssignmentEnrollment from "course" to "assignment - Added a JsonIgnore tag to the ID in AssignmentEnrollment - Added a USER_ID variable to bootstrap_data.sql for ease of testing - Added a 2 more test cases to Assignment enrolment in bootstrap_data
benjaminkostiuk
pushed a commit
that referenced
this issue
Oct 5, 2021
* PR#1 of issue #2 - Fixed up the `AssignmentEnrollment` entity - Created `AssignmentEnrollmentRepository` - Created `AssignmentEnrollmentPage` model - added test data to `bootstrap_data.sql` * Fixed some things for PR#1 of issue #2 - Renamed the assignment associated with AssignmentEnrollment from "course" to "assignment - Added a JsonIgnore tag to the ID in AssignmentEnrollment - Added a USER_ID variable to bootstrap_data.sql for ease of testing - Added a 2 more test cases to Assignment enrolment in bootstrap_data
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
Implement
/user
endpoints for the course-management microservice defined in https://github.com/puffproject/docs/blob/master/API_ARCHITECTURE.md.The task breaks down into the following steps:
PR#1 should be:
AssignmentEnrollment
entity based on theASSIGNMENT_ENROLLMENT
table. This is the table that keeps track of if a user is tracking an assignment, i.e. they are working on it. This includes a column where they can pin the assignment for easy access. Should join on the assignment id (SeeAssignment.java
to see example of join column)AssignmentEnrollment
entity with swagger annotations (@model etc.) + ignore the id and user id fields.AssignmentEnrollmentRepository
for the JPA database connection.AssignmentEnrollmentPage
model (extendBasePage
) to define the data model we want to return to the user. Add necessary swagger annotations.bootstrap_data.sql
file to automatically populate the database when the service is loaded.PR#2 should be:
5. Create a user service. You'll need methods for
restApi
package with all the right annotations. Don't forget to include thePrincipal
argument to get the user's token (it represents their identity)/user/assignments
: pageable endpoint that returnsAssignmentEnrollmentPage
objects. (Double check here that we can sort to the have the pinned ones at the top, I'm not sure if it's possible)/user/assignment/{assignmentId}/enroll?pin={true|false}
/user/assignment/{assignmentId}/unenroll
/user/engagement/{sourceType}/{sourceItemId}/vote
: Check if a user has voted on something (Might need to create a new model to return)PR#3 should be:
8. Automated testing for the user service class.
9. Automated mock testing for the user endpoints.
The text was updated successfully, but these errors were encountered: