openapi: 3.0.0 info: description: This is a sample server Student info server. For this sample, you can use the api key `special-key` to test the authorization filters. license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI student info version: 0.1.0 externalDocs: description: Find out more about Swagger url: http://swagger.io servers: - url: https://{env}-sg.portal.hocvienconggiao.com variables: env: default: dev enum: - dev - prod security: - student_auth: [] tags: - description: Everything about your students name: student paths: /mutation-api/student-service/students: post: operationId: addstudent requestBody: $ref: '#/components/requestBodies/StudentRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Student' description: successful operation "405": description: Invalid input security: - student_auth: [] summary: Add new student tags: - mutation-student /query-api/student-service/students: get: description: Returns all students operationId: getStudents parameters: - explode: true in: query name: name required: false schema: type: string style: form - explode: true in: query name: email required: false schema: type: string style: form - explode: true in: query name: phone required: false schema: type: string style: form - explode: true in: query name: undergraduateSchool required: false schema: type: string style: form - explode: true in: query name: dateOfBirth required: false schema: format: date type: string style: form - explode: true in: query name: placeOfBirth required: false schema: type: string style: form - description: to sort +displayName for ASC and -displayName for DESC explode: true in: query name: sorts required: false schema: items: $ref: '#/components/schemas/StudentSortCriteria' type: array style: form - description: The number of students to skip before starting to collect the result set. explode: true in: query name: offset required: false schema: minimum: 0 type: integer style: form - description: The number of students to return. explode: true in: query name: count required: false schema: default: 20 maximum: 100 minimum: 1 type: integer style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/StudentViewCollection' description: Successful operation "400": description: Invalid ID supplied "404": description: Student not found summary: Get all students tags: - query-students /query-api/student-service/students/{id}: get: description: Returns a single student operationId: get_student_by_id parameters: - description: ID of student to return explode: false in: path name: id required: true schema: format: uuid type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/Student' description: Successful operation "400": description: Invalid ID supplied "404": description: Student not found summary: Find student by ID tags: - query-student /mutation-api/student-service/students/{id}: delete: operationId: delete_student parameters: - description: ID of student to delete explode: false in: path name: id required: true schema: format: uuid type: string style: simple responses: "204": description: Successful operation "400": description: Invalid ID supplied "404": description: student not found security: - student_auth: [] summary: Deletes a student tags: - mutation-student put: operationId: update_student parameters: - description: ID of student to update explode: false in: path name: id required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/StudentRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Student' description: Successful operation "400": description: Invalid ID supplied "404": description: Student not found "405": description: Validation exception security: - student_auth: [] summary: Update an existing student tags: - mutation-student components: requestBodies: StudentArray: content: application/json: schema: items: $ref: '#/components/schemas/Student' type: array description: List of student object required: true StudentRequest: content: application/json: schema: $ref: '#/components/schemas/Student' description: student object that needs to be added to the database required: true schemas: StudentSortCriteria: enum: - NAME_ASC - NAME_DESC - CHRISTIAN_NAME_ASC - CHRISTIAN_NAME_DESC - POLITY_NAME_ASC - POLITY_NAME_DESC - LOCATION_NAME_ASC - LOCATION_NAME_DESC - PLACE_OF_BIRTH_ASC - PLACE_OF_BIRTH_DESC type: string Student: description: Student info example: undergraduateSchool: Dai Chung Vien Thanh Quy - Can Tho firstName: Chien lastName: Nguyen placeOfBirth: Tra Vinh saintIdArray: - 40e6215d-b5c6-4896-987c-f30f3678f608 - 40e6215d-b5c6-4896-987c-f30f3678f608 phone: +84 1228019700 middleName: Huu dateOfBirth: 1983-05-16T00:00:00.000+0000 id: 53f549b9-99bf-4e12-88e3-c2f868953283 polityId: 4d084b56-54e1-4bd2-878e-c52675497c2b title: PRIEST email: binh@sunrise.vn properties: id: example: 53f549b9-99bf-4e12-88e3-c2f868953283 format: uuid type: string polityId: example: 4d084b56-54e1-4bd2-878e-c52675497c2b format: uuid type: string saintIdArray: items: example: 40e6215d-b5c6-4896-987c-f30f3678f608 format: uuid type: string type: array title: enum: - PRIEST - MONK - NUN type: string firstName: example: Chien type: string middleName: example: Huu type: string lastName: example: Nguyen type: string dateOfBirth: description: date of birth in format YYYY-MM-DD example: 1983-05-16 format: date type: string placeOfBirth: example: Tra Vinh type: string email: example: binh@sunrise.vn type: string phone: example: +84 1228019700 type: string undergraduateSchool: example: Dai Chung Vien Thanh Quy - Can Tho type: string title: Student type: object xml: name: student StudentView: description: Student View example: polityLocationAddress: 123 Cach Mang placeOfBirth: Tra Vinh polityLocationEmail: info@gmail.com dateOfBirth: 1983-05-16T00:00:00.000+0000 title: PRIEST undergraduateSchool: Dai Chung Vien Thanh Quy - Can Tho phone: +84 1228019700 polityName: Dong Thanh The name: Nguyen Huu Chien id: 53f549b9-99bf-4e12-88e3-c2f868953283 email: binh@sunrise.vn polityLocationName: Dong Thanh The Viet Nam christianName: Phero properties: id: example: 53f549b9-99bf-4e12-88e3-c2f868953283 format: uuid type: string polityName: example: Dong Thanh The type: string polityLocationName: example: Dong Thanh The Viet Nam type: string polityLocationAddress: example: 123 Cach Mang type: string polityLocationEmail: example: info@gmail.com type: string christianName: example: Phero type: string title: enum: - PRIEST - MONK - NUN type: string name: example: Nguyen Huu Chien type: string dateOfBirth: description: date of birth in format YYYY-MM-DD example: 1983-05-16 format: date type: string placeOfBirth: example: Tra Vinh type: string email: example: binh@sunrise.vn type: string phone: example: +84 1228019700 type: string undergraduateSchool: example: Dai Chung Vien Thanh Quy - Can Tho type: string title: Student View type: object xml: name: student StudentViewCollection: example: total: 0 hasMore: true students: - polityLocationAddress: 123 Cach Mang placeOfBirth: Tra Vinh polityLocationEmail: info@gmail.com dateOfBirth: 1983-05-16T00:00:00.000+0000 title: PRIEST undergraduateSchool: Dai Chung Vien Thanh Quy - Can Tho phone: +84 1228019700 polityName: Dong Thanh The name: Nguyen Huu Chien id: 53f549b9-99bf-4e12-88e3-c2f868953283 email: binh@sunrise.vn polityLocationName: Dong Thanh The Viet Nam christianName: Phero - polityLocationAddress: 123 Cach Mang placeOfBirth: Tra Vinh polityLocationEmail: info@gmail.com dateOfBirth: 1983-05-16T00:00:00.000+0000 title: PRIEST undergraduateSchool: Dai Chung Vien Thanh Quy - Can Tho phone: +84 1228019700 polityName: Dong Thanh The name: Nguyen Huu Chien id: 53f549b9-99bf-4e12-88e3-c2f868953283 email: binh@sunrise.vn polityLocationName: Dong Thanh The Viet Nam christianName: Phero properties: students: items: $ref: '#/components/schemas/StudentView' type: array hasMore: type: boolean total: format: int64 type: integer securitySchemes: student_auth: bearerFormat: JWT scheme: bearer type: http