2023-07-11 14:17:10 +02:00
import { FromSchema } from 'json-schema-to-ts' ;
export const validateFeatureSchema = {
$id : '#/components/schemas/validateFeatureSchema' ,
type : 'object' ,
required : [ 'name' ] ,
description : "Data used to validate a feature toggle's name." ,
properties : {
name : {
description : 'The feature name to validate.' ,
type : 'string' ,
example : 'my-feature-3' ,
} ,
2023-09-04 13:53:33 +02:00
projectId : {
description :
'The id of the project that the feature flag will belong to. If the target project has a feature naming pattern defined, the name will be validated against that pattern.' ,
nullable : true ,
type : 'string' ,
example : 'project-y' ,
} ,
2023-07-11 14:17:10 +02:00
} ,
components : { } ,
} as const ;
export type ValidateFeatureSchema = FromSchema < typeof validateFeatureSchema > ;