openapi: 3.0.0 info: description: This is a API for identity. license: name: Apache-2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Indentity info version: 0.1.2 externalDocs: description: Find out more about Swagger url: http://swagger.io servers: - url: http://{env}-sg.portal.hocvienconggiao.com variables: env: default: dev enum: - dev - prod security: - user_auth: [] tags: - description: Everything about users name: users paths: /query-api/users: get: description: Returns a single user operationId: query-users parameters: - description: The user name explode: true in: query name: username required: false schema: type: string style: form - description: The userphone number explode: true in: query name: phone required: false schema: type: string style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "400": description: Invalid ID supplied "404": description: User not found security: - user_auth: [] summary: Get users infomation tags: - query-user /query-api/users/{id}: get: description: Returns a single user operationId: query-user-by-id parameters: - description: The user id explode: false in: path name: id required: true schema: format: uuid type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "400": description: Invalid ID supplied "404": description: User not found security: - user_auth: [] summary: Get user infomation by id tags: - query-user /mutation-api/users/password: put: description: Update user password operationId: update-password requestBody: $ref: '#/components/requestBodies/inline_object' content: application/json: schema: properties: plainPassword: type: string type: object required: true responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: update password tags: - mutation-user /mutation-api/users/deactivation: post: description: Deactivate user operationId: deactivate_user responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: Deactive user tags: - mutation-user /mutation-api/users/activation: post: description: Activate user operationId: activate_user responses: "200": content: application/json: schema: $ref: '#/components/schemas/User' description: successful operation "405": description: Invalid input security: - user_auth: [] summary: Activate a user tags: - mutation-user components: requestBodies: UserRequest: content: application/json: schema: $ref: '#/components/schemas/User' description: User object that needs to be added to the database required: true inline_object: content: application/json: schema: $ref: '#/components/schemas/inline_object' required: true schemas: User: description: User info example: phone: phone id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 email: email username: username properties: id: format: uuid type: string username: type: string email: type: string phone: pattern: ^\+\d{2} .*$ type: string required: - username title: User type: object inline_object: properties: plainPassword: type: string type: object securitySchemes: user_auth: bearerFormat: JWT scheme: bearer type: http