1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/lib/openapi/spec/password-schema.ts
2023-07-06 08:24:46 +02:00

32 lines
1.1 KiB
TypeScript

import { FromSchema } from 'json-schema-to-ts';
export const passwordSchema = {
$id: '#/components/schemas/passwordSchema',
type: 'object',
additionalProperties: false,
required: ['password'],
description: 'Fields used to create new password or update old password',
properties: {
password: {
type: 'string',
example: 'k!5As3HquUrQ',
description: 'The new password to change or validate.',
},
oldPassword: {
type: 'string',
example: 'Oldk!5As3HquUrQ',
description:
'The old password the user is changing. This field is for the non-admin users changing their own password.',
},
confirmPassword: {
type: 'string',
example: 'k!5As3HquUrQ',
description:
'The confirmation of the new password. This field is for the non-admin users changing their own password.',
},
},
components: {},
} as const;
export type PasswordSchema = FromSchema<typeof passwordSchema>;