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

88 lines
2.7 KiB
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { parametersSchema } from './parameters-schema';
import { variantSchema } from './variant-schema';
import { overrideSchema } from './override-schema';
import { featureStrategySchema } from './feature-strategy-schema';
import { featureSchema } from './feature-schema';
import { constraintSchema } from './constraint-schema';
import { environmentSchema } from './environment-schema';
import { featureEnvironmentSchema } from './feature-environment-schema';
import { projectStatsSchema } from './project-stats-schema';
export const healthOverviewSchema = {
$id: '#/components/schemas/healthOverviewSchema',
type: 'object',
additionalProperties: false,
required: ['version', 'name'],
properties: {
version: {
type: 'number',
},
name: {
type: 'string',
},
description: {
type: 'string',
nullable: true,
},
defaultStickiness: {
type: 'string',
example: 'userId',
description:
'A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy',
},
2023-03-16 15:29:52 +01:00
mode: {
type: 'string',
enum: ['open', 'protected'],
example: 'open',
description:
"The project's [collaboration mode](https://docs.getunleash.io/reference/project-collaboration-mode). Determines whether non-project members can submit change requests or not.",
2023-03-16 15:29:52 +01:00
},
members: {
type: 'number',
},
health: {
type: 'number',
},
environments: {
type: 'array',
items: {
type: 'string',
},
},
features: {
type: 'array',
items: {
$ref: '#/components/schemas/featureSchema',
},
},
updatedAt: {
type: 'string',
format: 'date-time',
nullable: true,
},
favorite: {
type: 'boolean',
},
stats: {
$ref: '#/components/schemas/projectStatsSchema',
description: 'Project statistics',
},
},
components: {
schemas: {
constraintSchema,
environmentSchema,
featureSchema,
featureEnvironmentSchema,
overrideSchema,
parametersSchema,
featureStrategySchema,
variantSchema,
projectStatsSchema,
},
},
} as const;
export type HealthOverviewSchema = FromSchema<typeof healthOverviewSchema>;