mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-17 13:46:47 +02:00
1. Added new schema and tests 2. Controller also accepts the data 3. Also sending fake data from frontend currently Next steps, implement service/store layer and frontend
31 lines
907 B
TypeScript
31 lines
907 B
TypeScript
import type { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const featureLifecycleCompletedSchema = {
|
|
$id: '#/components/schemas/featureLifecycleCompletedSchema',
|
|
description: 'A feature that has been marked as completed',
|
|
additionalProperties: false,
|
|
type: 'object',
|
|
required: ['status'],
|
|
properties: {
|
|
status: {
|
|
type: 'string',
|
|
enum: ['kept', 'discarded'],
|
|
example: 'kept',
|
|
description:
|
|
'The status of the feature after it has been marked as completed',
|
|
},
|
|
statusValue: {
|
|
type: 'string',
|
|
example: 'variant1',
|
|
description: 'The metadata value passed in together with status',
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {},
|
|
},
|
|
} as const;
|
|
|
|
export type FeatureLifecycleCompletedSchema = FromSchema<
|
|
typeof featureLifecycleCompletedSchema
|
|
>;
|