1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/lib/openapi/spec/token-user-schema.ts

28 lines
653 B
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { roleSchema } from './role-schema';
export const tokenUserSchema = {
$id: '#/components/schemas/tokenUserSchema',
type: 'object',
additionalProperties: false,
required: ['createdBy', 'token', 'role'],
properties: {
createdBy: {
type: 'string',
},
token: {
type: 'string',
},
role: {
$ref: '#/components/schemas/roleSchema',
},
},
components: {
schemas: {
roleSchema,
},
},
} as const;
export type TokenUserSchema = FromSchema<typeof tokenUserSchema>;