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/me-schema.ts

44 lines
1.1 KiB
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { userSchema } from './user-schema';
import { permissionSchema } from './permission-schema';
import { feedbackSchema } from './feedback-schema';
export const meSchema = {
$id: '#/components/schemas/meSchema',
type: 'object',
additionalProperties: false,
required: ['user', 'permissions', 'feedback', 'splash'],
properties: {
user: {
$ref: '#/components/schemas/userSchema',
},
permissions: {
type: 'array',
items: {
$ref: '#/components/schemas/permissionSchema',
},
},
feedback: {
type: 'array',
items: {
$ref: '#/components/schemas/feedbackSchema',
},
},
splash: {
type: 'object',
additionalProperties: {
type: 'boolean',
},
},
},
components: {
schemas: {
userSchema,
permissionSchema,
feedbackSchema,
},
},
} as const;
export type MeSchema = FromSchema<typeof meSchema>;