1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/src/lib/openapi/spec/users-schema.ts

37 lines
1.0 KiB
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { userSchema } from './user-schema';
import { roleSchema } from './role-schema';
export const usersSchema = {
$id: '#/components/schemas/usersSchema',
type: 'object',
additionalProperties: false,
description: 'Users and root roles',
required: ['users'],
properties: {
users: {
type: 'array',
description: 'A list of users in the Unleash instance.',
items: {
$ref: '#/components/schemas/userSchema',
},
},
rootRoles: {
type: 'array',
description:
'A list of [root roles](https://docs.getunleash.io/reference/rbac#standard-roles) in the Unleash instance.',
items: {
$ref: '#/components/schemas/roleSchema',
},
},
},
components: {
schemas: {
userSchema,
roleSchema,
},
},
} as const;
export type UsersSchema = FromSchema<typeof usersSchema>;