1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/src/lib/openapi/spec/export-result-schema.ts

65 lines
1.9 KiB
TypeScript
Raw Normal View History

2023-01-11 16:00:20 +01:00
import { FromSchema } from 'json-schema-to-ts';
import { featureSchema } from './feature-schema';
import { featureStrategySchema } from './feature-strategy-schema';
2023-01-17 12:10:20 +01:00
import { featureEnvironmentSchema } from './feature-environment-schema';
import { contextFieldSchema } from './context-field-schema';
import { featureTagSchema } from './feature-tag-schema';
2023-01-18 09:41:22 +01:00
import { segmentSchema } from './segment-schema';
2023-01-11 16:00:20 +01:00
export const exportResultSchema = {
$id: '#/components/schemas/exportResultSchema',
type: 'object',
additionalProperties: false,
required: ['features', 'featureStrategies'],
properties: {
features: {
type: 'array',
items: {
$ref: '#/components/schemas/featureSchema',
},
},
featureStrategies: {
type: 'array',
items: {
$ref: '#/components/schemas/featureStrategySchema',
},
},
2023-01-17 12:10:20 +01:00
featureEnvironments: {
type: 'array',
items: {
$ref: '#/components/schemas/featureEnvironmentSchema',
},
},
contextFields: {
type: 'array',
items: {
$ref: '#/components/schemas/contextFieldSchema',
},
},
featureTags: {
type: 'array',
items: {
$ref: '#/components/schemas/featureTagSchema',
},
},
2023-01-18 09:41:22 +01:00
segments: {
type: 'array',
items: {
$ref: '#/components/schemas/segmentSchema',
},
},
2023-01-11 16:00:20 +01:00
},
components: {
schemas: {
featureSchema,
featureStrategySchema,
2023-01-17 12:10:20 +01:00
featureEnvironmentSchema,
contextFieldSchema,
featureTagSchema,
2023-01-18 09:41:22 +01:00
segmentSchema,
2023-01-11 16:00:20 +01:00
},
},
} as const;
export type ExportResultSchema = FromSchema<typeof exportResultSchema>;