/
health-overview-schema.ts
74 lines (72 loc) · 2.07 KB
/
health-overview-schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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,
},
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>;