2022-06-08 15:31:34 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
import { healthOverviewSchema } from './health-overview-schema' ;
export const healthReportSchema = {
. . . healthOverviewSchema ,
$id : '#/components/schemas/healthReportSchema' ,
2023-05-19 09:07:23 +02:00
description :
'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature toggles.' ,
2022-06-08 15:31:34 +02:00
required : [
. . . healthOverviewSchema . required ,
'potentiallyStaleCount' ,
'activeCount' ,
'staleCount' ,
] ,
properties : {
. . . healthOverviewSchema . properties ,
potentiallyStaleCount : {
type : 'number' ,
2023-05-19 09:07:23 +02:00
description : 'The number of potentially stale feature toggles.' ,
example : 5 ,
2022-06-08 15:31:34 +02:00
} ,
activeCount : {
type : 'number' ,
2023-05-19 09:07:23 +02:00
description : 'The number of active feature toggles.' ,
example : 2 ,
2022-06-08 15:31:34 +02:00
} ,
staleCount : {
type : 'number' ,
2023-05-19 09:07:23 +02:00
description : 'The number of stale feature toggles.' ,
example : 10 ,
2022-06-08 15:31:34 +02:00
} ,
} ,
} as const ;
export type HealthReportSchema = FromSchema < typeof healthReportSchema > ;