2022-06-22 14:55:43 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
|
|
|
|
export const passwordSchema = {
|
|
|
|
$id: '#/components/schemas/passwordSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
|
|
|
required: ['password'],
|
2023-07-06 08:24:46 +02:00
|
|
|
description: 'Fields used to create new password or update old password',
|
2022-06-22 14:55:43 +02:00
|
|
|
properties: {
|
|
|
|
password: {
|
|
|
|
type: 'string',
|
2023-07-06 08:24:46 +02:00
|
|
|
example: 'k!5As3HquUrQ',
|
|
|
|
description: 'The new password to change or validate.',
|
2022-06-22 14:55:43 +02:00
|
|
|
},
|
2023-06-05 11:58:25 +02:00
|
|
|
oldPassword: {
|
|
|
|
type: 'string',
|
2023-07-06 08:24:46 +02:00
|
|
|
example: 'Oldk!5As3HquUrQ',
|
|
|
|
description:
|
|
|
|
'The old password the user is changing. This field is for the non-admin users changing their own password.',
|
2023-06-05 11:58:25 +02:00
|
|
|
},
|
2022-06-22 14:55:43 +02:00
|
|
|
confirmPassword: {
|
|
|
|
type: 'string',
|
2023-07-06 08:24:46 +02:00
|
|
|
example: 'k!5As3HquUrQ',
|
|
|
|
description:
|
|
|
|
'The confirmation of the new password. This field is for the non-admin users changing their own password.',
|
2022-06-22 14:55:43 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type PasswordSchema = FromSchema<typeof passwordSchema>;
|