1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src/lib/openapi/spec/feature-lifecycle-completed-schema.ts
Jaanus Sellin 28a7797aea
feat: feature lifecycle completed schema (#7021)
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
2024-05-09 09:51:44 +03:00

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
>;