mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
df59b10fb6
This PR fixes additional schemas that hadn't been described properly
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { groupSchema } from './group-schema';
|
|
import { userSchema } from './user-schema';
|
|
import { groupUserModelSchema } from './group-user-model-schema';
|
|
|
|
export const usersGroupsBaseSchema = {
|
|
$id: '#/components/schemas/usersGroupsBaseSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
description: 'An overview of user groups and users.',
|
|
properties: {
|
|
groups: {
|
|
type: 'array',
|
|
description: 'A list of user groups and their configuration.',
|
|
items: {
|
|
$ref: '#/components/schemas/groupSchema',
|
|
},
|
|
example: [
|
|
{
|
|
id: 1,
|
|
name: 'unleash-e2e-7095756699593281',
|
|
userCount: 1,
|
|
rootRole: null,
|
|
},
|
|
],
|
|
},
|
|
users: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/userSchema',
|
|
},
|
|
description: 'A list of users.',
|
|
example: [
|
|
{
|
|
id: 4,
|
|
name: 'unleash-e2e-user2-7095756699593281',
|
|
email: 'unleash-e2e-user2-7095756699593281@test.com',
|
|
accountType: 'User',
|
|
},
|
|
{
|
|
id: 1,
|
|
username: 'admin',
|
|
accountType: 'User',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
groupSchema,
|
|
groupUserModelSchema,
|
|
userSchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type UsersGroupsBaseSchema = FromSchema<typeof usersGroupsBaseSchema>;
|