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-dependencies-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

35 lines
1.0 KiB
TypeScript

import type { 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
>;