Skip to content
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

Fix swagger duplication on GET /user/{id} endpoint #995

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 46 additions & 96 deletions docs/user/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ paths:
}
totalReviews: { student: 10, tutor: 8 }
averageRating: { student: 4.5, tutor: 4.9 }
nativeLanguage: english
nativeLanguage: English
address: { country: The USA, city: California }
professionalSummary: KNPU H.S. Skovoroda
photo: john-doe-photo.jpg
Expand Down Expand Up @@ -95,7 +95,7 @@ paths:
}
totalReviews: { student: 0, tutor: 530 }
averageRating: { student: 0, tutor: 5 }
nativeLanguage: ukrainian
nativeLanguage: Ukrainian
address: { country: Ukraine, city: Kharkiv }
professionalSummary: KNPU H.S. Skovoroda
photo: joe-doe-photo.jpg
Expand Down Expand Up @@ -220,101 +220,51 @@ paths:
application/json:
schema:
$ref: '#/definitions/user'
examples:
example1:
summary: Example 1
value:
_id: 6255bc080a75adf9223df100
role: student
firstName: John
lastName: Doe
email: johndoe@gmail.com
mainSubjects:
{
student:
[
{
_id: 64593435163b62124ce4c3ab,
category:
{
_id: '6421ed8ed991d46a84721df2',
name: Cybersecurity,
appearance: { icon: 'IconName', color: '#123456' }
},
subjects: [{ _id: '6421ed8ed991d46a84721df2', name: 'XSS Attack' }],
isDeletionBlocked: false
}
],
tutor: []
}
totalReviews: { student: 10, tutor: 0 }
averageRating: { student: 4.5, tutor: 0 }
nativeLanguage: english
address: { country: The USA, city: California }
ProfessionalSummary: KNPU H.S. Skovoroda
photo: john-doe-photo.jpg
status: { student: active, tutor: active, admin: active }
isEmailConfirmed: true
isFirstLogin: true
lastLogin: 2022-09-02T11:59:53.243+00:00
lastSeen: 2022-09-02T11:59:53.243+00:00
bookmarkedOffers: []
FAQ:
{
student: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }],
tutor: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }]
}
videoLink:
{ student: www.youtube.com/watch?v=ebTnuLRnIOY, tutor: www.youtube.com/watch?v=ebTnuLRnIOY }
createdAt: 2021-04-09T11:34:53.243+00:00
updatedAt: 2022-09-02T11:59:53.243+00:00
example2:
summary: Example 2
value:
_id: 6255bc080a75adf9223df100
role: student
firstName: John
lastName: Doe
email: johndoe@gmail.com
mainSubjects:
{
student:
[
example:
_id: 6255bc080a75adf9223df100
role: student
firstName: John
lastName: Doe
email: johndoe@gmail.com
mainSubjects:
{
student:
[
{
_id: 64593435163b62124ce4c3ab,
category:
{
_id: 64593435163b62124ce4c3ab,
category:
{
_id: '6421ed8ed991d46a84721df2',
name: Cybersecurity,
appearance: { icon: 'IconName', color: '#123456' }
},
subjects: [{ _id: '6421ed8ed991d46a84721df2', name: 'XSS Attack' }],
isDeletionBlocked: false
}
],
tutor: []
}
totalReviews: { student: 10, tutor: 0 }
averageRating: { student: 4.5, tutor: 0 }
nativeLanguage: english
address: { country: The USA, city: California }
professionalSummary: KNPU H.S. Skovoroda
photo: john-doe-photo.jpg
status: { student: active, tutor: active, admin: active }
isEmailConfirmed: true
isFirstLogin: true
lastLogin: 2022-09-02T11:59:53.243+00:00
lastSeen: 2022-09-02T11:59:53.243+00:00
bookmarkedOffers: []
FAQ:
{
student: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }],
tutor: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }]
}
videoLink:
{ student: www.youtube.com/watch?v=ebTnuLRnIOY, tutor: www.youtube.com/watch?v=ebTnuLRnIOY }
createdAt: 2021-04-09T11:34:53.243+00:00
updatedAt: 2022-09-02T11:59:53.243+00:00
_id: '6421ed8ed991d46a84721df2',
name: Cybersecurity,
appearance: { icon: 'IconName', color: '#123456' }
},
subjects: [{ _id: '6421ed8ed991d46a84721df2', name: 'XSS Attack' }],
isDeletionBlocked: false
}
],
tutor: []
}
totalReviews: { student: 10, tutor: 0 }
averageRating: { student: 4.5, tutor: 0 }
nativeLanguage: English
address: { country: The USA, city: California }
professionalSummary: KNPU H.S. Skovoroda
photo: john-doe-photo.jpg
status: { student: active, tutor: active, admin: active }
isEmailConfirmed: true
isFirstLogin: true
lastLogin: 2022-09-02T11:59:53.243+00:00
lastSeen: 2022-09-02T11:59:53.243+00:00
bookmarkedOffers: []
FAQ:
{
student: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }],
tutor: [{ question: tutor question, _id: 63525e23bf163f5ea609ff2b, answer: tutor answer }]
}
videoLink:
{ student: www.youtube.com/watch?v=ebTnuLRnIOY, tutor: www.youtube.com/watch?v=ebTnuLRnIOY }
createdAt: 2021-04-09T11:34:53.243+00:00
updatedAt: 2022-09-02T11:59:53.243+00:00
400:
description: Bad Request
content:
Expand Down
Loading