From 0f768f3e4c3082b9c779a9903c6cf218ac1b6244 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Wed, 17 Mar 2021 00:46:05 +0100 Subject: [PATCH] Test openapi schema of /citizens/{citizen}/password/change --- src/main/resources/openapi2.yaml | 41 ++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/main/resources/openapi2.yaml b/src/main/resources/openapi2.yaml index 60ed3f9..667f71b 100644 --- a/src/main/resources/openapi2.yaml +++ b/src/main/resources/openapi2.yaml @@ -392,7 +392,6 @@ paths: $ref: '#/components/schemas/CitizenListResponse' 401: $ref: '#/components/responses/401' - /citizens/current: get: security: @@ -408,7 +407,6 @@ paths: application/json: schema: $ref: '#/components/schemas/CitizenResponse' - /citizens/{citizen}: parameters: - $ref: '#/components/parameters/citizen' @@ -430,6 +428,45 @@ paths: description: Citizen not found 401: $ref: '#/components/responses/401' + /citizens/{citizen}/password/change: + parameters: + - $ref: '#/components/parameters/citizen' + put: + security: + - JWTAuth: [ ] + summary: Change Citizen Password + tags: + - citizen + operationId: changePassword + requestBody: + required: true + content: + application/json: + schema: + required: + - oldPassword + - newPassword + properties: + oldPassword: + type: string + format: password + example: + azerty + newPassword: + type: string + format: password + example: + qwerty + responses: + 201: + description: Password changed + 400: + description: Bad request + 401: + $ref: '#/components/responses/401' + 404: + description: Citizen not found + components: parameters: page: