2022-06-08 08:01:14 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
2022-04-25 14:17:59 +02:00
2022-06-08 08:01:14 +02:00
export const createFeatureSchema = {
$id : '#/components/schemas/createFeatureSchema' ,
2022-04-25 14:17:59 +02:00
type : 'object' ,
required : [ 'name' ] ,
properties : {
name : {
type : 'string' ,
2023-07-14 16:48:35 +02:00
example : 'disable-comments' ,
description : 'Unique feature name' ,
2022-04-25 14:17:59 +02:00
} ,
type : {
type : 'string' ,
2023-07-14 16:48:35 +02:00
example : 'release' ,
description :
"The feature toggle's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission" ,
2022-04-25 14:17:59 +02:00
} ,
description : {
type : 'string' ,
2023-07-14 16:48:35 +02:00
nullable : true ,
example :
'Controls disabling of the comments section in case of an incident' ,
description : 'Detailed description of the feature' ,
2022-04-25 14:17:59 +02:00
} ,
impressionData : {
type : 'boolean' ,
2023-07-14 16:48:35 +02:00
example : false ,
description :
'`true` if the impression data collection is enabled for the feature, otherwise `false`.' ,
2022-04-25 14:17:59 +02:00
} ,
} ,
2022-06-08 08:01:14 +02:00
components : { } ,
2022-04-25 14:17:59 +02:00
} as const ;
2022-06-08 08:01:14 +02:00
export type CreateFeatureSchema = FromSchema < typeof createFeatureSchema > ;