1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/src/lib/openapi/spec/feature-dependencies-schema.ts

35 lines
1.0 KiB
TypeScript
Raw Normal View History

import { FromSchema } from 'json-schema-to-ts';
import { dependentFeatureSchema } from './dependent-feature-schema';
export const featureDependenciesSchema = {
$id: '#/components/schemas/featureDependenciesSchema',
type: 'object',
description:
'Feature dependency connection between a child feature and its dependencies',
required: ['feature', 'dependencies'],
additionalProperties: false,
properties: {
feature: {
type: 'string',
description: 'The name of the child feature.',
example: 'child_feature',
},
dependencies: {
type: 'array',
description: 'List of parent features for the child feature',
items: {
$ref: '#/components/schemas/dependentFeatureSchema',
},
},
},
components: {
schemas: {
dependentFeatureSchema,
},
},
} as const;
export type FeatureDependenciesSchema = FromSchema<
typeof featureDependenciesSchema
>;