2022-06-22 13:31:41 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
2022-06-22 14:55:43 +02:00
|
|
|
import { roleSchema } from './role-schema';
|
2022-06-22 13:31:41 +02:00
|
|
|
|
|
|
|
export const tokenUserSchema = {
|
|
|
|
$id: '#/components/schemas/tokenUserSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
|
|
|
required: ['createdBy', 'token', 'role'],
|
|
|
|
properties: {
|
|
|
|
createdBy: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
token: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
role: {
|
2022-06-22 14:55:43 +02:00
|
|
|
$ref: '#/components/schemas/roleSchema',
|
2022-06-22 13:31:41 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
2022-06-22 14:55:43 +02:00
|
|
|
roleSchema,
|
2022-06-22 13:31:41 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type TokenUserSchema = FromSchema<typeof tokenUserSchema>;
|