openapi: 3.0.0 info: description: This is a sample server Saint 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 Saint info version: 0.7.4 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: - saint_auth: [] tags: - description: Everything about your Saints name: saint paths: /mutation-api/saint-service/saints: post: operationId: addSaint requestBody: $ref: '#/components/requestBodies/SaintRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Saint' description: successful operation "405": description: Invalid input security: - saint_auth: [] summary: Add new saint tags: - saint /query-api/saint-service/saints: get: description: Returns all saints operationId: getAllSaints parameters: - explode: true in: query name: gender required: false schema: $ref: '#/components/schemas/Gender' style: form - explode: true in: query name: displayName required: false schema: type: string style: form - explode: true in: query name: vietnameseName required: false schema: type: string style: form - explode: true in: query name: englishName required: false schema: type: string style: form - description: feast day in format DD-MM explode: true in: query name: feastDay required: false schema: example: 31-12 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/SaintSortCriteria' type: array style: form - description: The number of saints 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 saints 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/SaintCollection' description: successful operation "400": description: Invalid ID supplied "404": description: Saint not found summary: Get all saints tags: - saint /query-api/saint-service/saints/{id}: get: description: Returns a single saint operationId: get_saint_by_id parameters: - description: ID of saint 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/Saint' description: successful operation "400": description: Invalid ID supplied "404": description: Saint not found summary: Find saint by ID tags: - saint /mutation-api/saint-service/saints/{id}: delete: operationId: delete_saint parameters: - description: ID of saint 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: Saint not found security: - saint_auth: [] summary: Deletes a saint tags: - saint put: operationId: update_saint parameters: - description: ID of saint to update explode: false in: path name: id required: true schema: format: uuid type: string style: simple requestBody: $ref: '#/components/requestBodies/SaintRequest' responses: "200": content: application/json: schema: $ref: '#/components/schemas/Saint' description: successful operation "400": description: Invalid ID supplied "404": description: Saint not found "405": description: Validation exception security: - saint_auth: [] summary: Update an existing saint tags: - saint components: requestBodies: SaintArray: content: application/json: schema: items: $ref: '#/components/schemas/Saint' type: array description: List of saint object required: true SaintRequest: content: application/json: schema: $ref: '#/components/schemas/Saint' description: Saint object that needs to be added to the database required: true schemas: SaintSortCriteria: enum: - DISPLAY_NAME_ASC - DISPLAY_NAME_DESC - VIETNAMESE_NAME_ASC - VIETNAMESE_NAME_DESC - ENGLISH_NAME_ASC - ENGLISH_NAME_DESC - FEAST_DAY_ASC - FEAST_DAY_DESC type: string Gender: enum: - MALE - FEMALE type: string Saint: description: Saint info example: englishName: Andrew gender: MALE feastDay: 31-12 displayName: Anrê vietnameseName: Anrê id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 frenchName: André latinName: Andreas properties: id: format: uuid type: string displayName: example: Anrê type: string englishName: example: Andrew type: string frenchName: example: André type: string latinName: example: Andreas type: string vietnameseName: example: Anrê type: string gender: enum: - MALE - FEMALE type: string feastDay: description: feast day in format DD-MM example: 31-12 pattern: ^\d{2}-\d{2}$ type: string required: - displayName - feastDay - gender - vietnameseName title: Saint type: object xml: name: Saint SaintCollection: example: total: 0 saints: - englishName: Andrew gender: MALE feastDay: 31-12 displayName: Anrê vietnameseName: Anrê id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 frenchName: André latinName: Andreas - englishName: Andrew gender: MALE feastDay: 31-12 displayName: Anrê vietnameseName: Anrê id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 frenchName: André latinName: Andreas hasMore: true properties: saints: items: $ref: '#/components/schemas/Saint' type: array hasMore: type: boolean total: format: int64 type: integer securitySchemes: saint_auth: bearerFormat: JWT scheme: bearer type: http