Koha-clms/api/v1/swagger/paths/patrons_password.yaml

59 lines
1.5 KiB
YAML

---
"/patrons/{patron_id}/password":
post:
x-mojo-to: Patrons::Password#set
operationId: setPatronPassword
tags:
- patrons
summary: Set password for a patron
parameters:
- $ref: ../parameters.yaml#/patron_id_pp
- name: body
in: body
description: A JSON object containing password information
schema:
type: object
properties:
password:
description: New password (plain text)
type: string
password_2:
description: Repeated new password (plain text)
type: string
required:
- password
- password_2
additionalProperties: false
produces:
- application/json
responses:
"200":
description: Password changed
"400":
description: Bad request
schema:
$ref: ../definitions.yaml#/error
"401":
description: Authentication required
schema:
$ref: ../definitions.yaml#/error
"403":
description: Access forbidden
schema:
$ref: ../definitions.yaml#/error
"404":
description: Patron not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: Internal server error
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
borrowers: "1"