openapi: 3.0.0 info: description: This is a sample server program 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 program info version: 0.0.1 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: - program_auth: [] tags: - description: Everything about your programs name: program paths: /mutation-api/enrolable-service/programs: post: operationId: addProgram requestBody: $ref: '#/components/requestBodies/ProgramRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Program' description: successful operation "405": description: Invalid input security: - program_auth: [] summary: Add new program tags: - program-mutation /mutation-api/enrolable-service/programs/{id}: delete: operationId: deleteProgram parameters: - description: ID of program 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: program not found security: - program_auth: [] summary: Deletes a program tags: - program-mutation put: operationId: updateProgram parameters: - description: ID of program to update explode: false in: path name: id required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/ProgramRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Program' description: Successful operation "400": description: Invalid ID supplied "404": description: program not found "405": description: Validation exception security: - program_auth: [] summary: Update an existing program tags: - program-mutation /query-api/enrolable-service/programs: get: description: Returns all programs operationId: getPrograms 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 - explode: true in: query name: polityName required: false schema: type: string style: form - explode: true in: query name: specialism 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/ProgramSortCriteria' type: array style: form - description: The number of programs 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 programs 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/ProgramViewCollection' description: Successful operation "400": description: Invalid ID supplied "404": description: program not found summary: Get all programs tags: - program-query /query-api/enrolable-service/programs/{id}: get: description: Returns a single program operationId: getProgramById parameters: - description: ID of program 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/Program' description: Successful operation "400": description: Invalid ID supplied "404": description: program not found summary: Find program by ID tags: - program-query components: requestBodies: ProgramArray: content: application/json: schema: items: $ref: '#/components/schemas/Program' type: array description: List of program object required: true ProgramRequest: content: application/json: schema: $ref: '#/components/schemas/Program' description: program object that needs to be added to the database required: true schemas: ProgramSortCriteria: enum: - NAME_ASC - NAME_DESC type: string Program: description: program info example: id: 53f549b9-99bf-4e12-88e3-c2f868953283 properties: id: example: 53f549b9-99bf-4e12-88e3-c2f868953283 format: uuid type: string title: program type: object xml: name: program ProgramView: description: program View example: id: 53f549b9-99bf-4e12-88e3-c2f868953283 properties: id: example: 53f549b9-99bf-4e12-88e3-c2f868953283 format: uuid type: string title: program View type: object xml: name: program ProgramViewCollection: example: total: 0 hasMore: true programs: - id: 53f549b9-99bf-4e12-88e3-c2f868953283 - id: 53f549b9-99bf-4e12-88e3-c2f868953283 properties: programs: items: $ref: '#/components/schemas/ProgramView' type: array hasMore: type: boolean total: format: int64 type: integer securitySchemes: program_auth: bearerFormat: JWT scheme: bearer type: http