From 150653c6849e5f8db3527af558cff615f496295c Mon Sep 17 00:00:00 2001 From: Oleksandr Tkachuk Date: Wed, 4 Dec 2024 06:31:26 +0200 Subject: [PATCH] add swagger examples for student and tutor views --- docs/cooperation/cooperation.yaml | 507 ++++++++++++++++++++---------- 1 file changed, 349 insertions(+), 158 deletions(-) diff --git a/docs/cooperation/cooperation.yaml b/docs/cooperation/cooperation.yaml index 98f7f7b3..b8a8e613 100644 --- a/docs/cooperation/cooperation.yaml +++ b/docs/cooperation/cooperation.yaml @@ -160,164 +160,355 @@ paths: application/json: schema: $ref: '#/definitions/cooperation' - example: - _id: 8755bc080a00adr9243df106 - offer: - _id: 63ebc6fbd2f34037d0aba791 - proficiencyLevel: - - Intermediate - - Advanced - - Test Preparation - - Professional - title: 'Understanding Quadratic Equations' - description: "In this lesson, we will delve into the world of quadratic equations. We'll explore the standard form of a quadratic equation, learn how to identify the coefficients, and understand the significance of the discriminant. Students will also practice solving quadratic equations using various methods, including factoring, completing the square, and the quadratic formula. By the end of the lesson, students will be able to solve quadratic equations confidently and understand their graphical representations." - languages: - - English - author: - totalReviews: - student: 0 - tutor: 0 - averageRating: - student: 0 - tutor: 0 - _id: 6658f73f93885febb491e08b - firstName: 'John' - lastName: 'Doe' - photo: '6658f73f93885-test_student.png' - professionalSummary: 'I am student of the University of Cambridge. I am passionate about learning mathematics.' - subject: - _id: 6566133a2bccdd3e18dbe943 - name: 'Algebra' - category: - appearance: - color: '#E3B21C' - icon: 'TagRoundedIcon' - _id: '64884f33fdc2d1a130c24ac2' - name: 'Mathematics' - initiator: - address: - country: 'USA' - city: 'California' - mainSubjects: - student: [] - tutor: [] - totalReviews: - student: 8 - tutor: 7.5 - averageRating: - student: 5 - tutor: 4.9 - status: - student: 'active' - tutor: 'active' - admin: 'active' - videoLink: - student: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JohnDoe' - professionalBlock: - awards: 'Gold medal in mathematics competition' - scientificActivities: 'Founded the Math Club at the University of Cambridge' - workExperience: 'n/a' - education: 'Working towards a Bachelor of Mathematics at the University of Cambridge' - notificationSettings: - isOfferStatusNotification: true - isChatNotification: true - isSimilarOffersNotification: true - isEmailNotification: true - _id: 6658f6b793885febb491e07c - role: - - 'student' - firstName: 'John' - lastName: 'Doe' - email: 'john_doe@gmail.com' - nativeLanguage: English - lastLogin: '2024-08-06T13:47:50.872Z' - createdAt: '2024-05-30T21:59:19.434Z' - updatedAt: '2024-08-06T13:47:50.872Z' - professionalSummary: 'I am a student at the University of Cambridge studying Mathematics. I am passionate about learning mathematics.' - initiatorRole: 'student' - receiver: - address: - country: 'USA' - city: 'Massachusetts' - mainSubjects: - student: [] - tutor: - - category: '64884f4dfdc2d1a130c24ac6' - subjects: - - '6675874d59019cd05eb11a16' - - '65660fbbcb972798c401a9b4' - _id: '6675a09d83835d79e960087a' - - category: '64884f98fdc2d1a130c24ad4' - subjects: - - '66758d6e59019cd05eb11a5d' - _id: '6675a08e83835d79e9600842' - - category: '64884f33fdc2d1a130c24ac2' - subjects: - - '6566133a2bccdd3e18dbe943' - _id: '6675a06f83835d79e96007fc' - totalReviews: - student: 10 - tutor: 8 - averageRating: - student: 4.5 - tutor: 4.9 - status: - student: 'active' - tutor: 'active' - admin: 'active' - videoLink: - tutor: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JaneRoe' - professionalBlock: - awards: 'The best tutor of the year 2023' - scientificActivities: "The author of the scientific work 'The role of mathematics in the development of society'" - workExperience: 'I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals.' - education: 'The University of Cambridge, Bachelor of Mathematics' - notificationSettings: - isOfferStatusNotification: true - isChatNotification: true - isSimilarOffersNotification: true - isEmailNotification: true - _id: 6658f73f93885febb491e08b - role: - - 'tutor' - firstName: 'Jane' - lastName: 'Roe' - email: 'jane_roe@gmail.com' - nativeLanguage: null - lastLogin: '2024-09-06T21:08:58.254Z' - createdAt: '2024-05-30T22:01:35.360Z' - updatedAt: '2024-09-06T21:08:58.256Z' - photo: '6658f73f938-test_tutor.png' - professionalSummary: 'Recently graduated from the University of Cambridge with a degree in Mathematics. I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals. I am passionate about teaching and enjoy helping students understand complex mathematical concepts. I believe that every student has the potential to succeed and I am committed to helping them reach their full potential.' - receiverRole: 'tutor' - title: 'Understanding Quadratic Equations' - proficiencyLevel: 'Intermediate' - price: 150 - status: 'active' - needAction: 'tutor' - availableQuizzes: [] - finishedQuizzes: [] - sections: - - title: Section title - description: Section description - resources: - - resource: - title: Colors in English - description: With this lesson you will learn all about colors in English. - content:

Title

- author: 63da8767c9ad4c9a0b0eacd3 - attachments: - - 63ed1cd25e9d781cdb6a6b15 - category: - _id: 6477007a6fa4d05e1a800ce1 - name: Languages - _id: 63ed1cd25e9d781cdb6a6b17 - resourceType: lesson - availability: - status: open - date: 2022-10-18T13:25:36.292+00:00 - createdAt: '2024-07-02T16:29:40.956Z' - updatedAt: '2024-09-06T15:27:29.999Z' + examples: + studentView: + summary: Student view + value: + _id: 8755bc080a00adr9243df106 + offer: + _id: 63ebc6fbd2f34037d0aba791 + proficiencyLevel: + - Intermediate + - Advanced + - Test Preparation + - Professional + title: 'Understanding Quadratic Equations' + description: "In this lesson, we will delve into the world of quadratic equations. We'll explore the standard form of a quadratic equation, learn how to identify the coefficients, and understand the significance of the discriminant. Students will also practice solving quadratic equations using various methods, including factoring, completing the square, and the quadratic formula. By the end of the lesson, students will be able to solve quadratic equations confidently and understand their graphical representations." + languages: + - English + author: + totalReviews: + student: 0 + tutor: 0 + averageRating: + student: 0 + tutor: 0 + _id: 6658f73f93885febb491e08b + firstName: 'John' + lastName: 'Doe' + photo: '6658f73f93885-test_student.png' + professionalSummary: 'I am student of the University of Cambridge. I am passionate about learning mathematics.' + subject: + _id: 6566133a2bccdd3e18dbe943 + name: 'Algebra' + category: + appearance: + color: '#E3B21C' + icon: 'TagRoundedIcon' + _id: '64884f33fdc2d1a130c24ac2' + name: 'Mathematics' + initiator: + address: + country: 'USA' + city: 'California' + mainSubjects: + student: [] + tutor: [] + totalReviews: + student: 8 + tutor: 7.5 + averageRating: + student: 5 + tutor: 4.9 + status: + student: 'active' + tutor: 'active' + admin: 'active' + videoLink: + student: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JohnDoe' + professionalBlock: + awards: 'Gold medal in mathematics competition' + scientificActivities: 'Founded the Math Club at the University of Cambridge' + workExperience: 'n/a' + education: 'Working towards a Bachelor of Mathematics at the University of Cambridge' + notificationSettings: + isOfferStatusNotification: true + isChatNotification: true + isSimilarOffersNotification: true + isEmailNotification: true + _id: 6658f6b793885febb491e07c + role: + - 'student' + firstName: 'John' + lastName: 'Doe' + email: 'john_doe@gmail.com' + nativeLanguage: English + lastLogin: '2024-08-06T13:47:50.872Z' + createdAt: '2024-05-30T21:59:19.434Z' + updatedAt: '2024-08-06T13:47:50.872Z' + professionalSummary: 'I am a student at the University of Cambridge studying Mathematics. I am passionate about learning mathematics.' + initiatorRole: 'student' + receiver: + address: + country: 'USA' + city: 'Massachusetts' + mainSubjects: + student: [] + tutor: + - category: '64884f4dfdc2d1a130c24ac6' + subjects: + - '6675874d59019cd05eb11a16' + - '65660fbbcb972798c401a9b4' + _id: '6675a09d83835d79e960087a' + - category: '64884f98fdc2d1a130c24ad4' + subjects: + - '66758d6e59019cd05eb11a5d' + _id: '6675a08e83835d79e9600842' + - category: '64884f33fdc2d1a130c24ac2' + subjects: + - '6566133a2bccdd3e18dbe943' + _id: '6675a06f83835d79e96007fc' + totalReviews: + student: 10 + tutor: 8 + averageRating: + student: 4.5 + tutor: 4.9 + status: + student: 'active' + tutor: 'active' + admin: 'active' + videoLink: + tutor: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JaneRoe' + professionalBlock: + awards: 'The best tutor of the year 2023' + scientificActivities: "The author of the scientific work 'The role of mathematics in the development of society'" + workExperience: 'I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals.' + education: 'The University of Cambridge, Bachelor of Mathematics' + notificationSettings: + isOfferStatusNotification: true + isChatNotification: true + isSimilarOffersNotification: true + isEmailNotification: true + _id: 6658f73f93885febb491e08b + role: + - 'tutor' + firstName: 'Jane' + lastName: 'Roe' + email: 'jane_roe@gmail.com' + nativeLanguage: null + lastLogin: '2024-09-06T21:08:58.254Z' + createdAt: '2024-05-30T22:01:35.360Z' + updatedAt: '2024-09-06T21:08:58.256Z' + photo: '6658f73f938-test_tutor.png' + professionalSummary: 'Recently graduated from the University of Cambridge with a degree in Mathematics. I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals. I am passionate about teaching and enjoy helping students understand complex mathematical concepts. I believe that every student has the potential to succeed and I am committed to helping them reach their full potential.' + receiverRole: 'tutor' + title: 'Understanding Quadratic Equations' + proficiencyLevel: 'Intermediate' + price: 150 + status: 'active' + needAction: 'tutor' + availableQuizzes: [] + finishedQuizzes: [] + sections: + - title: Section title + description: Section description + resources: + - resource: + title: Colors in English + description: With this lesson you will learn all about colors in English. + content:

Title

+ author: 63da8767c9ad4c9a0b0eacd3 + attachments: + - 63ed1cd25e9d781cdb6a6b15 + category: + _id: 6477007a6fa4d05e1a800ce1 + name: Languages + _id: 63ed1cd25e9d781cdb6a6b17 + resourceType: lesson + availability: + status: open + date: null + _id: 674cae6458b8af8857ffac8a + createdAt: '2024-07-02T16:29:40.956Z' + updatedAt: '2024-09-06T15:27:29.999Z' + tutorView: + summary: Tutor view + value: + _id: 8755bc080a00adr9243df106 + offer: + _id: 63ebc6fbd2f34037d0aba791 + proficiencyLevel: + - Intermediate + - Advanced + - Test Preparation + - Professional + title: 'Understanding Quadratic Equations' + description: "In this lesson, we will delve into the world of quadratic equations. We'll explore the standard form of a quadratic equation, learn how to identify the coefficients, and understand the significance of the discriminant. Students will also practice solving quadratic equations using various methods, including factoring, completing the square, and the quadratic formula. By the end of the lesson, students will be able to solve quadratic equations confidently and understand their graphical representations." + languages: + - English + author: + totalReviews: + student: 0 + tutor: 0 + averageRating: + student: 0 + tutor: 0 + _id: 6658f73f93885febb491e08b + firstName: 'John' + lastName: 'Doe' + photo: '6658f73f93885-test_student.png' + professionalSummary: 'I am student of the University of Cambridge. I am passionate about learning mathematics.' + subject: + _id: 6566133a2bccdd3e18dbe943 + name: 'Algebra' + category: + appearance: + color: '#E3B21C' + icon: 'TagRoundedIcon' + _id: '64884f33fdc2d1a130c24ac2' + name: 'Mathematics' + initiator: + address: + country: 'USA' + city: 'California' + mainSubjects: + student: [] + tutor: [] + totalReviews: + student: 8 + tutor: 7.5 + averageRating: + student: 5 + tutor: 4.9 + status: + student: 'active' + tutor: 'active' + admin: 'active' + videoLink: + student: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JohnDoe' + professionalBlock: + awards: 'Gold medal in mathematics competition' + scientificActivities: 'Founded the Math Club at the University of Cambridge' + workExperience: 'n/a' + education: 'Working towards a Bachelor of Mathematics at the University of Cambridge' + notificationSettings: + isOfferStatusNotification: true + isChatNotification: true + isSimilarOffersNotification: true + isEmailNotification: true + _id: 6658f6b793885febb491e07c + role: + - 'student' + firstName: 'John' + lastName: 'Doe' + email: 'john_doe@gmail.com' + nativeLanguage: English + lastLogin: '2024-08-06T13:47:50.872Z' + createdAt: '2024-05-30T21:59:19.434Z' + updatedAt: '2024-08-06T13:47:50.872Z' + professionalSummary: 'I am a student at the University of Cambridge studying Mathematics. I am passionate about learning mathematics.' + initiatorRole: 'student' + receiver: + address: + country: 'USA' + city: 'Massachusetts' + mainSubjects: + student: [] + tutor: + - category: '64884f4dfdc2d1a130c24ac6' + subjects: + - '6675874d59019cd05eb11a16' + - '65660fbbcb972798c401a9b4' + _id: '6675a09d83835d79e960087a' + - category: '64884f98fdc2d1a130c24ad4' + subjects: + - '66758d6e59019cd05eb11a5d' + _id: '6675a08e83835d79e9600842' + - category: '64884f33fdc2d1a130c24ac2' + subjects: + - '6566133a2bccdd3e18dbe943' + _id: '6675a06f83835d79e96007fc' + totalReviews: + student: 10 + tutor: 8 + averageRating: + student: 4.5 + tutor: 4.9 + status: + student: 'active' + tutor: 'active' + admin: 'active' + videoLink: + tutor: 'https://www.youtube.com/watch?v=ebTnuLRnIOY-JaneRoe' + professionalBlock: + awards: 'The best tutor of the year 2023' + scientificActivities: "The author of the scientific work 'The role of mathematics in the development of society'" + workExperience: 'I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals.' + education: 'The University of Cambridge, Bachelor of Mathematics' + notificationSettings: + isOfferStatusNotification: true + isChatNotification: true + isSimilarOffersNotification: true + isEmailNotification: true + _id: 6658f73f93885febb491e08b + role: + - 'tutor' + firstName: 'Jane' + lastName: 'Roe' + email: 'jane_roe@gmail.com' + nativeLanguage: null + lastLogin: '2024-09-06T21:08:58.254Z' + createdAt: '2024-05-30T22:01:35.360Z' + updatedAt: '2024-09-06T21:08:58.256Z' + photo: '6658f73f938-test_tutor.png' + professionalSummary: 'Recently graduated from the University of Cambridge with a degree in Mathematics. I have been tutoring students in Mathematics for over 5 years and have helped many students achieve their academic goals. I am passionate about teaching and enjoy helping students understand complex mathematical concepts. I believe that every student has the potential to succeed and I am committed to helping them reach their full potential.' + receiverRole: 'tutor' + title: 'Understanding Quadratic Equations' + proficiencyLevel: 'Intermediate' + price: 150 + status: 'active' + needAction: 'tutor' + availableQuizzes: [] + finishedQuizzes: [] + sections: + - title: Section title + description: Section description + resources: + - resource: + title: Colors in English + description: With this lesson you will learn all about colors in English. + content:

Title

+ author: 63da8767c9ad4c9a0b0eacd3 + attachments: + - 63ed1cd25e9d781cdb6a6b15 + category: + _id: 6477007a6fa4d05e1a800ce1 + name: Languages + _id: 63ed1cd25e9d781cdb6a6b17 + resourceType: lesson + availability: + status: open + date: null + - resource: + _id: 674ea3bfee3f962bc6854f2d + author: 674d29abfc17e913ec1b25ca + fileName: file1.pdf + link: 1733181402666-file1.pdf + size: 1189396 + category: null + resourceType: attachment + isDuplicate: true + resourceType: attachment + availability: + status: closed + date: null + - resource: + _id: 674ea3bfee3f962bc6854f2c + author: 674d29abfc17e913ec1b25ca + fileName: file2.pdf + link: 1733181402666-file2.pdf + size: 1189396 + category: null + resourceType: attachment + isDuplicate: true + resourceType: attachment + availability: + status: openFrom + date: '2024-09-06T15:27:29.999Z' + _id: 674cae6458b8af8857ffac8a + createdAt: '2024-07-02T16:29:40.956Z' + updatedAt: '2024-09-06T15:27:29.999Z' 400: description: Bad Request content: